aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>1998-11-08 03:19:20 +0000
committerMartin v. Löwis <loewis@gcc.gnu.org>1998-11-08 03:19:20 +0000
commit997a088c832a48a5bd0adaf1d2c49ca0fde20e99 (patch)
tree4ae628d895f0e3c6a8326a584d0ad0f46ddaca5d
parent6b57b51d1140e4b54f3332396d60439cedf62a42 (diff)
downloadgcc-997a088c832a48a5bd0adaf1d2c49ca0fde20e99.zip
gcc-997a088c832a48a5bd0adaf1d2c49ca0fde20e99.tar.gz
gcc-997a088c832a48a5bd0adaf1d2c49ca0fde20e99.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2f67717..484799c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
+
+ * decl.c (grokdeclarator): Allow namespace-scoped members if they
+ are friends.
+
1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
* 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 a547242..485d8e4 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 `::'");