public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33736] New: "error: integer constant is too large for long type" incorrect for C++0x
@ 2007-10-11 13:32 lloyd at randombit dot net
2007-11-13 5:12 ` [Bug c++/33736] " manu at gcc dot gnu dot org
2008-08-23 12:38 ` manu at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: lloyd at randombit dot net @ 2007-10-11 13:32 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
Integer constants that don't fit into a long cause a pedwarn in GCC as of the
20070907 snapshot (this has been the behavior for a while). However this is
incorrect for C++0x which does (at least in the WG draft) allows for something
to be placed in a long long or unsigned long long if it doesn't fit into
anything smaller (section 2.13.1.2 + table 5). However GCC pedwarns even with
-std=c++0x or -std=gnu++0x
(On x86-64 or other 64-bit machines this behavior can be observed while
compiling with -m32).
$ g++-4.3-20070907 -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3-20070907/configure --program-suffix=-4.3-20070907
--enable-language=c,c++ --prefix=/home/jack/opt --with-mpfr=/home/jack/opt
Thread model: posix
gcc version 4.3.0 20070907 (experimental) (GCC)
--
Summary: "error: integer constant is too large for long type"
incorrect for C++0x
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lloyd at randombit dot net
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33736
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33736] "error: integer constant is too large for long type" incorrect for C++0x
2007-10-11 13:32 [Bug c++/33736] New: "error: integer constant is too large for long type" incorrect for C++0x lloyd at randombit dot net
@ 2007-11-13 5:12 ` manu at gcc dot gnu dot org
2008-08-23 12:38 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-11-13 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from manu at gcc dot gnu dot org 2007-11-13 05:12 -------
Confirmed as far as I know. I have seen a similar bug somewhere, thoug.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-11-13 05:12:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33736
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33736] "error: integer constant is too large for long type" incorrect for C++0x
2007-10-11 13:32 [Bug c++/33736] New: "error: integer constant is too large for long type" incorrect for C++0x lloyd at randombit dot net
2007-11-13 5:12 ` [Bug c++/33736] " manu at gcc dot gnu dot org
@ 2008-08-23 12:38 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-23 12:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from manu at gcc dot gnu dot org 2008-08-23 12:37 -------
I think this is a duplicate of 13358. The warning should be conditional on
Wlong-long and Wlong-long should be disabled in -std=c++0x (in fact it is
already). I am testing a patch btw.
*** This bug has been marked as a duplicate of 13358 ***
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33736
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-23 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-11 13:32 [Bug c++/33736] New: "error: integer constant is too large for long type" incorrect for C++0x lloyd at randombit dot net
2007-11-13 5:12 ` [Bug c++/33736] " manu at gcc dot gnu dot org
2008-08-23 12:38 ` manu at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).