[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gcc -mshort question



>On Thu, Apr 22, 1999 at 12:39:34PM -0600, Oddie Jonathan wrote:
>> >Hi Jonathan!
>> >
>> >OJ>Just yesterday I noticed that my gcc seems to be doing strange things
>> >OJ>when -mshort is enabled. It reports sizeof(short)=0, long=2, int=0,
>> >OJ>and char=4. Without -mshort shorts are 2, longs and ints 4, and chars
>> >OJ>1, just as it should be.
>> >Do not use %d, %u or %x  in the format string for printf(), use %ld, %lu or
>> >%lx instead (the values returned by sizeof are 4 Bytes long)
>> 
>> OK -- I never knew about those conversions, as I've just been using
>> the back of the K&R book for library reference.

>Funny enough that Jörg could find out the error, isn't it?

Hmm? 
> 
>> I still think it might be a good idea to get a new compiler though :)

>Yes, you should. If you don't care about compiling shared text executables
>(-mbaserel) you can ask Frank Naumann for the latest egcs-Version.
>Otherwise look out for at least gcc-2.7.2, gcc-2.8.x is also good but as
>far as I remember it has some bugs in the preprocessor.

Actually I do sort of need to compile -mbaserel programs as that's the default
for W window system. What's egcs?

>You should also update your assembler.  Try "as --version".  It should
>report at least 2.8.x (don't mix that up with the gcc version; it's only
>by accident that they are so close to each other, the as version origins
>from the GNU binutils version).

It says *1.48*!! Ouch...
I'll look for newer MiNT binutils on piwo tonight.

Thanks everyone for your help

ttfn
Jonathan