
Error in VC 6.0 SP1 Compiler?
Quote:
>> Hang on -- doesn't that suggest that:
>> int a = sizeof int;
>> should work? Because it doesn't.
>And let me just diagree with myself: thanks to Rimantas
>Endriukaitis I now see what's going on.
>I think that the described behaviour is correct, according
>to ANSI. If the Borland compiler doesn't like it, I think
>the Borland compiler is wrong. (incidentally, CodeWarrior
>and PC Lint both flag it as an error.)
I'll bet that if you qualified the scope with enclosing parenthesis,
Borland, CodeWarrior, and Lint would accept it as a viable line of code.
VC++ appears to actually be correct in it's interpretation of the code
since parenthesis' aren't *required* to properly parse the code.
--
=========================================================
John Simmons - Redneck Techno-Biker (Zerex12)
http://www.members.home.net/jms1/index.html
John Simmons - Barbarian Diecast Collector
http://members.home.net/jsimm/diecast_index.html
If you want to send me email, go to either of the URL's
shown above & click "Send Me Mail" in the contents frame.
=========================================================