This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: signed is undefined and has been since 1992 (in GCC)


----Original Message----
>From: Olivier Galibert
>Sent: 28 June 2005 15:25

> In particular, a very large number of C and C++ programs are written
> with the assumptions:

  This is a bad line of reasoning in general.  There is a vast amount of bad
software in the world, some blatantly buggy, some subtly-incorrect.  To
attempt to fix it all in the compiler rather than the source seems a bit
bass-ackwards to me!

> - sizeof(int) == 4, sizeof(long long) == 8
> 
> - sizeof(long) == sizeof(void *) == sizeof(void (*)())
> 
> Break them and see your compiler rejected by pretty much everybody.

  And what about 64 bit architectures?  Your assumptions are already widely
invalid and only going to get more so.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]