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]
Other format: [Raw text]

[Bug c++/13358] long long and C++ do not mix well in 3.3/3.4


------- Additional Comments From zack at gcc dot gnu dot org  2003-12-08 19:36 -------
It IS a valid long long constant in C99: see the table in section
6.4.4.1 paragraph 5.  (This is the text Lloyd already quoted in
comment 4.)

'long long' is not part of C++98 and therefore legitimately objected
to by -pedantic/-pedantic-errors (the latter being the default in C++).
However, if GCC is to support it at all in C++ it should be given 
C99-compatible semantics.

That IMHO means, if the smallest type that can represent the value of
an unsuffixed constant is 'long long', then -Wno-long-long should cause 
it to be silently accepted as a 'long long' constant.  Further, this
is the behavior of the C front end with -pedantic-errors -Wno-long-long,
and doing otherwise in C++ with -Wno-long-long and the implicit -pedantic-errors
is gratuitously inconsistent.

In other words, I agree with the reporter that this is a genuine bug.
Reopening.

zw

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13358


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