www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



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

↑ ↓ ← 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
↑ ↓ → 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