r277887 - in /trunk/gcc: cp/ChangeLog cp/parser...

jason@gcc.gnu.org jason@gcc.gnu.org
Wed Nov 6 16:06:00 GMT 2019


Author: jason
Date: Wed Nov  6 16:06:08 2019
New Revision: 277887

URL: https://gcc.gnu.org/viewcvs?rev=277887&root=gcc&view=rev
Log:
Fix parser to recognize operator?:

This change lets grok_op_properties print its useful "ISO C++ prohibits
overloading operator ?:" message instead of the cryptic error message about
a missing type-specifier before '?' token.

2019-11-06  Matthias Kretz  <m.kretz@gsi.de>

	* parser.c (cp_parser_operator): Parse operator?: as an
	attempt to overload the conditional operator.

Added:
    trunk/gcc/testsuite/g++.dg/parse/operator9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/g++.old-deja/g++.jason/operator.C



More information about the Gcc-cvs mailing list