Commit 1a3fab15 by Ed Smith-Rowland Committed by Edward Smith-Rowland

re PR c++/57640 (Explicit call of system literal operator complains about leading underscore.)

gcc/cp:

2013-06-25  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-25  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/57640
	* g++.dg/cpp1y/pr57640.C: New.

From-SVN: r200415
parent af4c64a7
2013-06-25 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.
2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x. * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
......
...@@ -5000,7 +5000,7 @@ cp_parser_unqualified_id (cp_parser* parser, ...@@ -5000,7 +5000,7 @@ cp_parser_unqualified_id (cp_parser* parser,
{ {
/* 17.6.3.3.5 */ /* 17.6.3.3.5 */
const char *name = UDLIT_OP_SUFFIX (id); const char *name = UDLIT_OP_SUFFIX (id);
if (name[0] != '_' && !in_system_header) if (name[0] != '_' && !in_system_header && declarator_p)
warning (0, "literal operator suffixes not preceded by %<_%>" warning (0, "literal operator suffixes not preceded by %<_%>"
" are reserved for future standardization"); " are reserved for future standardization");
} }
...@@ -12346,7 +12346,6 @@ cp_literal_operator_id (const char* name) ...@@ -12346,7 +12346,6 @@ cp_literal_operator_id (const char* name)
+ strlen (name) + 10); + strlen (name) + 10);
sprintf (buffer, UDLIT_OP_ANSI_FORMAT, name); sprintf (buffer, UDLIT_OP_ANSI_FORMAT, name);
identifier = get_identifier (buffer); identifier = get_identifier (buffer);
/*IDENTIFIER_UDLIT_OPNAME_P (identifier) = 1; If we get a flag someday. */
return identifier; return identifier;
} }
......
2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/57640
* g++.dg/cpp1y/pr57640.C: New.
2013-06-25 Balaji V. Iyer <balaji.v.iyer@intel.com> 2013-06-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/57692 PR c/57692
......
// { dg-options -std=c++1y }
// { dg-do compile }
#include <chrono>
using namespace std::literals::chrono_literals;
auto blooper = operator"" min(45.0L);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment