public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61653] New: Warning 'literal-suffix' is not suppressed by gcc pragma
@ 2014-06-30  6:47 ruslan_baratov at yahoo dot com
  2014-07-01 14:13 ` [Bug c++/61653] " manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ruslan_baratov at yahoo dot com @ 2014-06-30  6:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61653
           Summary: Warning 'literal-suffix' is not suppressed by gcc
                    pragma
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ruslan_baratov at yahoo dot com

Suppression of warning '-Wliteral-suffix' is not working. Example:

> cat foo.cpp
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"

#define N
const char* x = "abc"N;

#pragma GCC diagnostic pop

> g++ -Wall -std=c++11 -c foo.cpp
foo.cpp:5:17: warning: invalid suffix on literal; C++11 requires a space
between literal and string macro [-Wliteral-suffix]
 const char* x = "abc"N;

Clang works fine for the same code:
> cat foo.cpp
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreserved-user-defined-literal"

#define N
const char* x = "abc"N;

#pragma GCC diagnostic pop

> clang++ -Wall -std=c++11 -c foo.cpp
# silence here

Version:
> g++ --version
g++ (Ubuntu 4.9-20140406-1ubuntu1) 4.9.0 20140405 (experimental) [trunk
revision 209157]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Originally from SO:
http://stackoverflow.com/questions/24474538


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

* [Bug c++/61653] Warning 'literal-suffix' is not suppressed by gcc pragma
  2014-06-30  6:47 [Bug c++/61653] New: Warning 'literal-suffix' is not suppressed by gcc pragma ruslan_baratov at yahoo dot com
@ 2014-07-01 14:13 ` manu at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2014-07-01 14:13 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4998 bytes --]

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
#pragma GCC diagnostic does not work on warnings from the C++ preprocessor.

*** This bug has been marked as a duplicate of bug 53431 ***
>From gcc-bugs-return-455446-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 01 14:13:34 2014
Return-Path: <gcc-bugs-return-455446-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18899 invoked by alias); 1 Jul 2014 14:13:34 -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 18342 invoked by uid 48); 1 Jul 2014 14:13:28 -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 ignored "-Wundef"
Date: Tue, 01 Jul 2014 14:13: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-YqDgQpLpqO@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-07/txt/msg00037.txt.bz2
Content-length: 490

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|                            |ruslan_baratov at yahoo dot com

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 61653 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-455447-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 01 14:15:27 2014
Return-Path: <gcc-bugs-return-455447-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24364 invoked by alias); 1 Jul 2014 14:15:26 -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 24239 invoked by uid 48); 1 Jul 2014 14:15:19 -0000
From: "christophe.lyon at st dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/60723] Line directives with incorrect system header flag
Date: Tue, 01 Jul 2014 14:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: preprocessor
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: christophe.lyon at st dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-60723-4-IOpE4uhC7a@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60723-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60723-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-07/txt/msg00038.txt.bz2
Content-length: 288

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

--- Comment #15 from christophe.lyon at st dot com ---
Created attachment 33039
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3039&actioníit
preprocessed input

This preprocessed input (-E) shows how commit 212194 is broken.


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

end of thread, other threads:[~2014-07-01 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30  6:47 [Bug c++/61653] New: Warning 'literal-suffix' is not suppressed by gcc pragma ruslan_baratov at yahoo dot com
2014-07-01 14:13 ` [Bug c++/61653] " 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).