* decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
From-SVN: r23349
This commit is contained in:
parent
6004a083d4
commit
7e83af8482
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
* typeck2.c (process_init_constructor): Only skip anonymous fields
|
* 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);
|
friendp = RIDBIT_SETP (RID_FRIEND, specbits);
|
||||||
RIDBIT_RESET (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 (RIDBIT_SETP (RID_MUTABLE, specbits))
|
||||||
{
|
{
|
||||||
if (decl_context == PARM)
|
if (decl_context == PARM)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user