www.digitalmars.com         C & C++   DMDScript  

c++ - Does -A90 switch supposed to work?

reply Andrey <aspt mail.ru> writes:
It seems that dmc.exe uses C99 rules for default type of a decimal
literal, even if -A90 option is used.

The assert(-1 == 4294967295); fails regardless of -A option, although
it should pass on C90 compilers (assuming 32-bit long). The reason of
different behavior is that C90 takes RHS as uint32, while C99 assume
it int64.
Besides, probably -A90 allows another C99 features (like initial
declaration in a 'for' loop), so I wonder, does -A90 is supported?
Aug 08 2008
parent Walter Bright <newshound1 digitalmars.com> writes:
Andrey wrote:
 It seems that dmc.exe uses C99 rules for default type of a decimal
 literal, even if -A90 option is used.
 
 The assert(-1 == 4294967295); fails regardless of -A option, although
 it should pass on C90 compilers (assuming 32-bit long). The reason of
 different behavior is that C90 takes RHS as uint32, while C99 assume
 it int64.
 Besides, probably -A90 allows another C99 features (like initial
 declaration in a 'for' loop), so I wonder, does -A90 is supported?
 

Sorry, -A90 is incompletely supported at best.
Aug 15 2008