This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41561] New: warning on a large hex literal in C++ 0x mode
- From: "msebor at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2009 22:24:38 -0000
- Subject: [Bug c++/41561] New: warning on a large hex literal in C++ 0x mode
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
According to [lex.icon], Table 5 of the C++ 0x spec (e.g., N21914), the type
of the integer literal in the snippet below in ILP32 is long long. gcc does
the right thing (i.e., interprets the literal correctly) but the warning it
issues (with -m32 only) is unwarranted.
$ cat t.cpp && g++ -dumpversion && g++ -c -m32 -std=c++0x t.cpp
long long foo ()
{
return 0x123456789abcd;
}
4.4.1
t.cpp:3: warning: integer constant is too large for ?long? type
--
Summary: warning on a large hex literal in C++ 0x mode
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: msebor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41561