From: "Anthony.Appleyard" Organization: Materials Science Centre To: djgpp AT delorie DOT com Date: Fri, 18 Jul 1997 16:37:08 GMT-1 Subject: Re: sizeof() in #if Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk Message-ID: <19B4586802@fs2.mt.umist.ac.uk> Precedence: bulk Chris Croughton wrote:- > Sigh. Yes, sizeof is a compile-time operator in that it doesn't generate > calculations at run-time. However, it's not a pre-processing operator. ... I imagine that, if you simply wrote e.g. if(sizeof(int)==4) and the like, that if you compile with optimization, the compiler will detect conditions like this which can be worked out at compile time, and not bother to compile parts of the program which as a result are never obeyed. > If, on the other hand, you make pots of money out of it I'd appreciate you > mentioning me in your will (and so will Da Boyz with the machine guns in > violin cases)... They may well come, if you boot up with a floppy in the drive or the like. There is a computer virus called DaBoys.