public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57640] New: Explicit call of system literal operator complains about leading underscore.
@ 2013-06-18 5:04 3dw4rd at verizon dot net
2013-11-22 19:55 ` [Bug c++/57640] " 3dw4rd at verizon dot net
0 siblings, 1 reply; 2+ messages in thread
From: 3dw4rd at verizon dot net @ 2013-06-18 5:04 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: 3786 bytes --]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57640
Bug ID: 57640
Summary: Explicit call of system literal operator complains
about leading underscore.
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: 3dw4rd at verizon dot net
Since we added literal operators to the standard library I noticed that
if you explicitly call a std literal operator
-----------------------------------------------------------
#include <chrono>
using namespace std::literals::chrono_literals;
auto blooper = operator"" min(45.0L);
-----------------------------------------------------------
you get
-----------------------------------------------------------
blooper.cc:5:27: warning: literal operator suffixes not preceded by â_â are
reserved for future standardization [enabled by default]
auto blooper = operator"" min(45.0L);
-----------------------------------------------------------
The definition in the system header doesn't trigger this but the explicit call
in user code does.
Mot fatal, and won't be commonly hit butI'd like to fix it.
>From gcc-bugs-return-424568-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 18 05:48:51 2013
Return-Path: <gcc-bugs-return-424568-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17936 invoked by alias); 18 Jun 2013 05:48:51 -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 17626 invoked by uid 48); 18 Jun 2013 05:48:45 -0000
From: "3dw4rd at verizon dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57640] Explicit call of system literal operator complains about leading underscore.
Date: Tue, 18 Jun 2013 05:48: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.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: 3dw4rd at verizon dot net
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: attachments.created
Message-ID: <bug-57640-4-VHfCaavQFF@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57640-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57640-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: 2013-06/txt/msg00947.txt.bz2
Content-length: 668
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW640
--- Comment #1 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Created attachment 30317
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id0317&actioníit
Add declarator_p to checks to trigger warning.
Testing this fully but I think this tiny patch will do.
gcc/cp:
2013-06-18 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/57640
* parser.c (cp_parser_unqualified_id): Add declarator_p to checks
to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
gcc/testsuite:
2013-06-18 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/57640
* g++.dg/cpp1y/pr57640.C: New.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-22 19:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 5:04 [Bug c++/57640] New: Explicit call of system literal operator complains about leading underscore 3dw4rd at verizon dot net
2013-11-22 19:55 ` [Bug c++/57640] " 3dw4rd at verizon 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).