This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/3747


Jan van Dijk wrote:
> 
...
> 
> 1) If gcc-3 is correct, it seems that every other compiler out there is
> wrong. Every compiler I know of accepts this code.

At least three other compilers in addition to gcc reject the code: recent
versions pf the EDG front end (and, obviously, all compilers based on it,
e.g., Comeau C++), IBM VisualAge 5.0 and even MSVC.

>
...
> 
> 2) Out of curiosity, where in the standard is it stated explicitly that
> 0 is of type int, rather than unsigned?

2.13.1, p2: "The type of an integer literal depends on its form, value,
and suffix. If it is decimal and has no suffix, it has the first of these
types in which its value can be represented: int, long int; ..."

Regards
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]