[Bug c++/41561] New: warning on a large hex literal in C++ 0x mode
msebor at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 3 22:24:00 GMT 2009
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
More information about the Gcc-bugs
mailing list