public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
@ 2007-08-27 13:14 ` lloyd at randombit dot net
  2008-08-23 11:33 ` manu at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: lloyd at randombit dot net @ 2007-08-27 13:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from lloyd at randombit dot net  2007-08-27 13:14 -------
This should probably be reexamined with regards to C++0x, since it includes
'long long' and my reading of the working group draft is that a constant too
large to fit into a long should be considered a long long or unsigned long long
just as in C99. I think that would mean this warning should be disabled (in
C++0x mode) on all platforms.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
  2007-08-27 13:14 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
@ 2008-08-23 11:33 ` manu at gcc dot gnu dot org
  2008-08-23 12:27 ` manu at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-23 11:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from manu at gcc dot gnu dot org  2008-08-23 11:31 -------
I cannot reproduce the warning in C or C++. It seems this got "fixed" silently.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
  2007-08-27 13:14 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
  2008-08-23 11:33 ` manu at gcc dot gnu dot org
@ 2008-08-23 12:27 ` manu at gcc dot gnu dot org
  2008-08-23 12:38 ` manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-23 12:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from manu at gcc dot gnu dot org  2008-08-23 12:26 -------
OK, sorry, I needed -m32 in the command line to reproduce it. Is there a
consensus here? It seems too pedantic to warn for something that GCC can handle
perfectly well.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2008-08-23 12:27 ` manu at gcc dot gnu dot org
@ 2008-08-23 12:38 ` manu at gcc dot gnu dot org
  2009-02-07 20:23 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-23 12:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from manu at gcc dot gnu dot org  2008-08-23 12:37 -------
*** Bug 33736 has been marked as a duplicate of this bug. ***


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2008-08-23 12:38 ` manu at gcc dot gnu dot org
@ 2009-02-07 20:23 ` manu at gcc dot gnu dot org
  2009-04-20 22:13 ` manu at gcc dot gnu dot org
  2009-04-20 22:18 ` manu at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-02-07 20:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from manu at gcc dot gnu dot org  2009-02-07 20:23 -------
There is a patch here:

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00970.html


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |10/msg00970.html
           Keywords|                            |patch


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2009-02-07 20:23 ` manu at gcc dot gnu dot org
@ 2009-04-20 22:13 ` manu at gcc dot gnu dot org
  2009-04-20 22:18 ` manu at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-04-20 22:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from manu at gcc dot gnu dot org  2009-04-20 22:13 -------
Subject: Bug 13358

Author: manu
Date: Mon Apr 20 22:12:52 2009
New Revision: 146459

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146459
Log:
2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

        PR c++/13358
        * doc/invoke.texi (-Wlong-long): Update description.
        * c-lex (interpret_integer): Only warn if there was no previous
        overflow and -Wlong-long is enabled.
        * c-decl.c (declspecs_add_type): Drop redundant flags.
        * c.opt (Wlong-long): Init to -1.
        * c-opts.c (sanitize_cpp_opts): Synchronize cpp's warn_long_long
        and front-end warn_long_long. Wlong-long only depends on other
        flags if it is uninitialized.
        * c-parser.c (disable_extension_diagnostics): warn_long_long is
        the same for CPP and FE.
        (restore_extension_diagnostics): Likewise.
libcpp/
        * init.c (cpp_create_reader): Wlong_long is disabled by default.
        * expr.c (cpp_classify_number): Give different messages for C and
        C++ front-ends.
cp/
        * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
        * error.c (pedwarn_cxx98): New.
        * cp-tree.h (pedwarn_cxx98): Declare.
testsuite/
        * gcc.dg/wtr-int-type-1.c: Use two dg-warning to match two
        messages. Test for "long long" in system headers.
        * gcc.dg/c99-longlong-2.c: New.
        * g++.dg/warn/pr13358.C: New.
        * g++.dg/warn/pr13358-2.C: New.
        * g++.dg/warn/pr13358-3.C: New.
        * g++.dg/warn/pr13358-4.C: New.


Added:
    trunk/gcc/testsuite/g++.dg/warn/pr13358-2.C
    trunk/gcc/testsuite/g++.dg/warn/pr13358-3.C
    trunk/gcc/testsuite/g++.dg/warn/pr13358-4.C
    trunk/gcc/testsuite/g++.dg/warn/pr13358.C
    trunk/gcc/testsuite/gcc.dg/c99-longlong-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/c-lex.c
    trunk/gcc/c-opts.c
    trunk/gcc/c-parser.c
    trunk/gcc/c.opt
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/error.c
    trunk/gcc/cp/parser.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/c90-longlong-1.c
    trunk/gcc/testsuite/gcc.dg/wtr-int-type-1.c
    trunk/libcpp/ChangeLog
    trunk/libcpp/expr.c
    trunk/libcpp/init.c


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
       [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2009-04-20 22:13 ` manu at gcc dot gnu dot org
@ 2009-04-20 22:18 ` manu at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-04-20 22:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from manu at gcc dot gnu dot org  2009-04-20 22:18 -------
FIXED in GCC 4.5. 

+Warn if @samp{long long} type is used.  This is enabled by either
+@option{-pedantic} or @option{-Wtraditional} in ISO C90 and C++98
+modes.  To inhibit the warning messages, use @option{-Wno-long-long}


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
  2003-12-08 18:05 [Bug c++/13358] New: long long and C++ do not mix well in 3.3/3.4 lloyd at randombit dot net
  2004-01-23 19:04 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
  2004-02-24 18:34 ` giovannibajo at libero dot it
@ 2004-02-24 18:49 ` lloyd at randombit dot net
  2 siblings, 0 replies; 10+ messages in thread
From: lloyd at randombit dot net @ 2004-02-24 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lloyd at randombit dot net  2004-02-24 18:49 -------
You're right, it affects C as well. There was a discussion with Geoff Keating
late last month where he expressed some reservations, and eventually he agreed
that the patch made sense but he thought a C++ maintainer should look at it, so
my brain took me in the wrong direction. I'm going to start up some bootstaps
and will send a changelog and test reports after they finish.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
  2003-12-08 18:05 [Bug c++/13358] New: long long and C++ do not mix well in 3.3/3.4 lloyd at randombit dot net
  2004-01-23 19:04 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
@ 2004-02-24 18:34 ` giovannibajo at libero dot it
  2004-02-24 18:49 ` lloyd at randombit dot net
  2 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-24 18:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-24 18:34 -------
Jack,

your patch at http://gcc.gnu.org/ml/gcc-patches/2004-02/msg02242.html is 
missing a ChangeLog, and indication of which platform you bootstrapped/tested 
the patch on. Also, it's not a C++ patch beacuse it's outside gcc/cp/, so you 
need a full testing on all languages, and a global maintainer to look at it. 

Please review http://gcc.gnu.org/contribute.html for further information.

-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13358] long long and C++ do not mix well
  2003-12-08 18:05 [Bug c++/13358] New: long long and C++ do not mix well in 3.3/3.4 lloyd at randombit dot net
@ 2004-01-23 19:04 ` lloyd at randombit dot net
  2004-02-24 18:34 ` giovannibajo at libero dot it
  2004-02-24 18:49 ` lloyd at randombit dot net
  2 siblings, 0 replies; 10+ messages in thread
From: lloyd at randombit dot net @ 2004-01-23 19:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lloyd at randombit dot net  2004-01-23 19:04 -------
A patch for this PR was sent to gcc-bugs in this message:
  http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg02974.html


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-04-20 22:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-13358-6477@http.gcc.gnu.org/bugzilla/>
2007-08-27 13:14 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
2008-08-23 11:33 ` manu at gcc dot gnu dot org
2008-08-23 12:27 ` manu at gcc dot gnu dot org
2008-08-23 12:38 ` manu at gcc dot gnu dot org
2009-02-07 20:23 ` manu at gcc dot gnu dot org
2009-04-20 22:13 ` manu at gcc dot gnu dot org
2009-04-20 22:18 ` manu at gcc dot gnu dot org
2003-12-08 18:05 [Bug c++/13358] New: long long and C++ do not mix well in 3.3/3.4 lloyd at randombit dot net
2004-01-23 19:04 ` [Bug c++/13358] long long and C++ do not mix well lloyd at randombit dot net
2004-02-24 18:34 ` giovannibajo at libero dot it
2004-02-24 18:49 ` lloyd at randombit dot net

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).