Thanks!  That was helpful.  The machine had gcc -fstrictaliasing but not gcc -fnostrictaliasing, so I simply added to our Makefile:
if [ `uname -s` = "Darwin" ]; then cat ./configure | sed s/-O2//g > ./.cfg.tmp; cp ./.cfg.tmp ./configure; rm ./.cfg.tmp; fi && \
Brutish method, but it works, and performance dosnt matter except on our backend servers.
But now I was just informed, upgrading from:
gcc version 4.0.1 (Apple Computer, Inc. build 5250), to:
gcc version 4.0.1 (Apple Computer, Inc. build 5367), also fixes the problem.  So I'll be reverting my Makefile hack.

skaller <> wrote:
On Mon, 2007-05-28 at 18:12 -0700, Justin Foutts wrote:
> Heres my feedback:
> 1. Wow! Judy is great, blows away other data structures, thanks so
> much.
> 2. Ok. Now I'm back because I have hit the Judy Darwin Issue listed on

I should add feedback to this one. Judy code currently breaks ISO
rules that gcc 4.x implements. You need the switch


to prevent the optimisations based on C aliasing rules. My version of
gcc 4.x warns about this, I noted that in a previous email.

But Judy works anyhow on my platform with
my version of gcc. Here's what my man page says,
note the part I marked %%%

Allows the compiler to assume the strictest aliasing rules applica‐
ble to the language being compiled. For C (and C++), this acti‐
vates optimizations based on the type of expressions. In particu‐
lar, an object of one type is assumed never to reside at the same
address as an object of a different type, unless the types are
almost the same. For example, %%%an "unsigned int" can alias an
"int", but not a "void*"%%% or a "double". A character type may alias
any other type.

Pay special attention to code like this:

union a_union {
int i;
double d;

int f() {
a_union t;
t.d = 3.0;
return t.i;

The practice of reading from a different union member than the one
most recently written to (called "type-punning") is common. Even
with -fstrict-aliasing, type-punning is allowed, provided the mem‐
ory is accessed through the union type. So, the code above will
work as expected. However, this code might not:

int f() {
a_union t;
int* ip;
t.d = 3.0;
ip = &t.i;
return *ip;

Every language that wishes to perform language-specific alias anal‐
ysis should define a function that computes, given an "tree" node,
an alias set for the node. Nodes in different alias sets are not
allowed to alias. For an example, see the C front-end function

Enabled at levels -O2, -O3, -Os.

John Skaller
Felix, successor to C++:

You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.