Alexander J. Oss
2006-05-10 04:54:46 UTC
Visual Studio 2005 Standard is giving me "fatal error C1017: invalid integer
constant expression" on code that compiles fine in Borland land:
#if sizeof(char)==1
The standard says:
(5.19.1) ...An integral constant-expression can involve only ... and sizeof
expressions.
and
(5.3.3.1) sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1
That last quote from the standard makes it clear that my code is pretty
useless, since by the standard I'll never have any other case. However,
this shouldn't cause a compilation error, should it?
constant expression" on code that compiles fine in Borland land:
#if sizeof(char)==1
The standard says:
(5.19.1) ...An integral constant-expression can involve only ... and sizeof
expressions.
and
(5.3.3.1) sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1
That last quote from the standard makes it clear that my code is pretty
useless, since by the standard I'll never have any other case. However,
this shouldn't cause a compilation error, should it?