Commit 7e83af84 by Brendan Kehoe Committed by Brendan Kehoe

* decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.

From-SVN: r23349
parent 6004a083
1998-10-26 Brendan Kehoe <brendan@cygnus.com>
* decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
* typeck2.c (process_init_constructor): Only skip anonymous fields
......
......@@ -9235,6 +9235,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
friendp = RIDBIT_SETP (RID_FRIEND, specbits);
RIDBIT_RESET (RID_FRIEND, specbits);
/* $7.1.2, Function specifiers */
if (friendp && explicitp)
error ("only declarations of constructors can be `explicit'");
if (RIDBIT_SETP (RID_MUTABLE, specbits))
{
if (decl_context == PARM)
......
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