From: Brendan Kehoe Date: Mon, 26 Oct 1998 11:45:05 +0000 (+0000) Subject: * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. X-Git-Tag: prereleases/libgcj-0.1~2317 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e83af848287ef9ba06d5afab7519e00805b2f45;p=thirdparty%2Fgcc.git * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. From-SVN: r23349 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dd9fbe711219..8926b987dcbd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +1998-10-26 Brendan Kehoe + + * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. + 1998-10-26 Jason Merrill * typeck2.c (process_init_constructor): Only skip anonymous fields diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 5769a8871f39..983b2d03b8f1 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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)