From 997a088c832a48a5bd0adaf1d2c49ca0fde20e99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 8 Nov 1998 03:19:20 +0000 Subject: [PATCH] decl.c (grokdeclarator): Allow namespace-scoped members if they are friends. * decl.c (grokdeclarator): Allow namespace-scoped members if they are friends. From-SVN: r23567 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2f677172cb3..484799c2741 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1998-11-08 Martin von Löwis + + * decl.c (grokdeclarator): Allow namespace-scoped members if they + are friends. + 1998-11-08 Jason Merrill * pt.c (tsubst_decl): Don't mess with the global value of an diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a54724205c0..485d8e4b6fd 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10480,7 +10480,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) are error_mark_node, for example. */ decl = NULL_TREE; } - else if (in_namespace) + else if (in_namespace && !friendp) { /* Something like struct S { int N::j; }; */ cp_error ("invalid use of `::'"); -- 2.30.2