From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32366 invoked by alias); 30 Jun 2014 06:47:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32153 invoked by uid 48); 30 Jun 2014 06:47:04 -0000 From: "ruslan_baratov at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61653] New: Warning 'literal-suffix' is not suppressed by gcc pragma Date: Mon, 30 Jun 2014 06:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ruslan_baratov at yahoo dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-06/txt/msg02378.txt.bz2 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