------- Comment #3 from richard at beatnik dot com  2006-12-12 01:29 -------
Ahh,

I see.

Because the a is supposed to be long long, that means that it is of size 8,
which would mean that it takes two regs (or stack spaces, or where ever gcc
stores it's arguments).  Then the second %d in the string gets the second of
the two args, thus being zero:
             -----------------
             V               | first half of the 8 byte argument
printf( "a = %d sizeof %d\n", a, sizeof(en));
                       ^     | second half of the 8 byte argument
                       -------

When I change to 

             -----------------
             V               | the 8 byte argument
printf( "a = %lld sizeof %d\n", a, sizeof(en));
                       ^            | 
                       --------------

Thanks


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30160

Reply via email to