public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
@ 2011-05-06  9:40 bero at arklinux dot org
  2011-07-24 20:13 ` [Bug c++/48914] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bero at arklinux dot org @ 2011-05-06  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: #pragma GCC diagnostic ignored "-Wc++0x-compat"
                    doesn't work
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bero@arklinux.org


$ cat test.cpp
#pragma GCC diagnostic ignored "-Wc++0x-compat"
namespace std {
        class nullptr_t { };
}
extern std::nullptr_t nullptr;

$ g++ -Wc++0x-compat -c test.cpp
test.cpp:5:1: warning: identifier ‘nullptr’ will become a keyword in C++0x
[-Wc++0x-compat]

$ g++ -Wc++0x-compat -Werror -c test.cpp
test.cpp:5:1: error: identifier ‘nullptr’ will become a keyword in C++0x
[-Werror=c++0x-compat]
cc1plus: all warnings being treated as errors


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
@ 2011-07-24 20:13 ` pinskia at gcc dot gnu.org
  2011-09-28 17:57 ` paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-24 20:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.07.24 20:12:48
          Component|middle-end                  |c++
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-24 20:12:48 UTC ---
Confirmed.


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
  2011-07-24 20:13 ` [Bug c++/48914] " pinskia at gcc dot gnu.org
@ 2011-09-28 17:57 ` paolo.carlini at oracle dot com
  2011-09-29 15:40 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-28 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-28 17:34:44 UTC ---
So far have been able to figure out that diagnostic_classify_diagnostic
apparently sets correctly context->n_classification_history to 1 when the
pragma is parsed, but then is found == 0 in diagnostic_report_diagnostic.


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
  2011-07-24 20:13 ` [Bug c++/48914] " pinskia at gcc dot gnu.org
  2011-09-28 17:57 ` paolo.carlini at oracle dot com
@ 2011-09-29 15:40 ` paolo.carlini at oracle dot com
  2012-08-02  6:41 ` asmwarrior at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 15:31:03 UTC ---
It seems, the warning is emitted *before* the pragma is actually processed in
diagnostic_classify_diagnostic...


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (2 preceding siblings ...)
  2011-09-29 15:40 ` paolo.carlini at oracle dot com
@ 2012-08-02  6:41 ` asmwarrior at gmail dot com
  2012-08-02  8:28 ` asmwarrior at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: asmwarrior at gmail dot com @ 2012-08-02  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from asmwarrior <asmwarrior at gmail dot com> 2012-08-02 06:41:33 UTC ---
We are Code::Blocks' developers, we see the same annoying warnings, hope it
will be fixed. Thanks.
See:
http://forums.codeblocks.org/index.php/topic,16670.msg113169.html#msg113169


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (3 preceding siblings ...)
  2012-08-02  6:41 ` asmwarrior at gmail dot com
@ 2012-08-02  8:28 ` asmwarrior at gmail dot com
  2013-01-01 18:05 ` rjarrett at mathworks dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: asmwarrior at gmail dot com @ 2012-08-02  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from asmwarrior <asmwarrior at gmail dot com> 2012-08-02 08:28:10 UTC ---
(In reply to comment #4)
> We are Code::Blocks' developers, we see the same annoying warnings, hope it
> will be fixed. Thanks.
> See:
> http://forums.codeblocks.org/index.php/topic,16670.msg113169.html#msg113169

Sorry, I post a wrong link, the link is only accessed by C::B developers, so it
is a private link. But we just discuss the same issue.


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (4 preceding siblings ...)
  2012-08-02  8:28 ` asmwarrior at gmail dot com
@ 2013-01-01 18:05 ` rjarrett at mathworks dot com
  2013-01-02 18:51 ` rjarrett at mathworks dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rjarrett at mathworks dot com @ 2013-01-01 18:05 UTC (permalink / raw)
  To: gcc-bugs


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

Roger Jarrett <rjarrett at mathworks dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rjarrett at mathworks dot
                   |                            |com

--- Comment #6 from Roger Jarrett <rjarrett at mathworks dot com> 2013-01-01 18:04:49 UTC ---
Confirmed present in GCC 4.7.1 
g++ foo.cpp -Wall -std=c++98

 our use case is that we have a code base in transition to C++0x and have
created our own nullptr_t for the platform that have not yet transitioned to
C++0x we would like to acknowledge/suppress this warning in the file that
implements the nullptr_t without resorting to -Wno-c++0x-compat on the commmand
line.

--Roger


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (5 preceding siblings ...)
  2013-01-01 18:05 ` rjarrett at mathworks dot com
@ 2013-01-02 18:51 ` rjarrett at mathworks dot com
  2013-01-04 10:51 ` manu at gcc dot gnu.org
  2014-09-05 16:59 ` manu at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rjarrett at mathworks dot com @ 2013-01-02 18:51 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Roger Jarrett <rjarrett at mathworks dot com> 2013-01-02 18:51:12 UTC ---
Additional workaround (big hammer) 
#pragma GCC system_header

Best used when the code generating the warning is in an isolated header file
--Roger


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (6 preceding siblings ...)
  2013-01-02 18:51 ` rjarrett at mathworks dot com
@ 2013-01-04 10:51 ` manu at gcc dot gnu.org
  2014-09-05 16:59 ` manu at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu.org @ 2013-01-04 10:51 UTC (permalink / raw)
  To: gcc-bugs


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-01-04 10:51:22 UTC ---
Indeed, handle_pragma_diagnostic is called too late after lexing because
pragmas are only parsed during the parsing phase but warnings can be emitted
way earlier (and even earlier than lexing, during command-line setup).

Bah, this doesn't look easy to fix at all.


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

* [Bug c++/48914] #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
  2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
                   ` (7 preceding siblings ...)
  2013-01-04 10:51 ` manu at gcc dot gnu.org
@ 2014-09-05 16:59 ` manu at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: manu at gcc dot gnu.org @ 2014-09-05 16:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48914

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

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

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #9)
> If this warning is given by the preprocessor during lexing, then this is a
> dup of bug 53431.

It is.

*** This bug has been marked as a duplicate of bug 53431 ***
>From gcc-bugs-return-461314-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 05 16:59:43 2014
Return-Path: <gcc-bugs-return-461314-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16568 invoked by alias); 5 Sep 2014 16:59:43 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16500 invoked by uid 48); 5 Sep 2014 16:59:40 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic
Date: Fri, 05 Sep 2014 16:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-53431-4-d7W2IubWlS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-53431-4@http.gcc.gnu.org/bugzilla/>
References: <bug-53431-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg01148.txt.bz2
Content-length: 481

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bero at arklinux dot org

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 48914 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-461315-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 05 17:09:08 2014
Return-Path: <gcc-bugs-return-461315-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23275 invoked by alias); 5 Sep 2014 17:09:08 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23221 invoked by uid 48); 5 Sep 2014 17:09:04 -0000
From: "mikestump at comcast dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/20567] dg-options in gcc.c-torture
Date: Fri, 05 Sep 2014 17:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: testsuite
X-Bugzilla-Version: 4.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikestump at comcast dot net
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: janis at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-20567-4-EybdbTiwW0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-20567-4@http.gcc.gnu.org/bugzilla/>
References: <bug-20567-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg01149.txt.bz2
Content-length: 1016

https://gcc.gnu.org/bugzilla/show_bug.cgi?id 567

Mike Stump <mikestump at comcast dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikestump at comcast dot net

--- Comment #7 from Mike Stump <mikestump at comcast dot net> ---
gcc.c-torture/execute ignores dg-options settings has been fixed to honor it.

They now use the dg framework driver.

All the .x files are now gone.

The annotations have been updated.

No testcase specifies -O2 anymore.  One does -O, but that I think is for
correctness.

As for compile/981006-1.c, run was never needed to show the bug, so, assemble
alone is sufficient.  I don't know what might pop up from not using -w, I
suspect that was just inherited by default.  If you want to remove it (and
manage any fall out, I'd be fine with that.  I don't think it matters much.
The testcase isn't testing other warnings, just the one.


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

end of thread, other threads:[~2014-09-05 16:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-06  9:40 [Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work bero at arklinux dot org
2011-07-24 20:13 ` [Bug c++/48914] " pinskia at gcc dot gnu.org
2011-09-28 17:57 ` paolo.carlini at oracle dot com
2011-09-29 15:40 ` paolo.carlini at oracle dot com
2012-08-02  6:41 ` asmwarrior at gmail dot com
2012-08-02  8:28 ` asmwarrior at gmail dot com
2013-01-01 18:05 ` rjarrett at mathworks dot com
2013-01-02 18:51 ` rjarrett at mathworks dot com
2013-01-04 10:51 ` manu at gcc dot gnu.org
2014-09-05 16:59 ` manu at gcc dot gnu.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).