decl.c (grokdeclarator): Set constexprness before announcing friendship.
authorGabriel Dos Reis <gdr@cs.tamu.edu>
Fri, 2 Oct 2009 02:21:01 +0000 (02:21 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Fri, 2 Oct 2009 02:21:01 +0000 (02:21 +0000)
* decl.c (grokdeclarator): Set constexprness before announcing
friendship.

Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r152393

gcc/cp/ChangeLog
gcc/cp/decl.c

index fbe0637..31e1ac6 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-01  Gabriel Dos Reis  <gdr@cse.tamu.edu>
+           Jason Merrill <jason@redhat.com>
+
+       * decl.c (grokdeclarator): Set constexprness before announcing
+       friendship.
+
 2009-10-01  Gabriel Dos Reis  <gdr@cs.tamu.edu>
 
        * decl.c (record_builtin_java_type): Undo unintended change.
index 5d3ff9d..5eb389f 100644 (file)
@@ -9299,10 +9299,10 @@ grokdeclarator (const cp_declarator *declarator,
                      return error_mark_node;
                  }
 
+                DECL_DECLARED_CONSTEXPR_P (decl) = constexpr_p;
                decl = do_friend (ctype, unqualified_id, decl,
                                  *attrlist, flags,
                                  funcdef_flag);
-                DECL_DECLARED_CONSTEXPR_P (decl) = constexpr_p;
                return decl;
              }
            else