aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMumit Khan <khan@xraylith.wisc.edu>1999-08-03 07:03:03 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-08-03 03:03:03 -0400
commitfa20888b171a6020f833b37291b6399968a5ca19 (patch)
treeedb49f43aa3d1d30bfb126ddc2a55132b9847d3b
parent555b644206c5f90f6c397b359a16d39d846cc5f0 (diff)
downloadgcc-fa20888b171a6020f833b37291b6399968a5ca19.zip
gcc-fa20888b171a6020f833b37291b6399968a5ca19.tar.gz
gcc-fa20888b171a6020f833b37291b6399968a5ca19.tar.bz2
* decl.c (start_decl): Set attributes before duplicate_decls call.
From-SVN: r28442
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 886401a..a52ccf07 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * decl.c (start_decl): Set attributes before duplicate_decls call.
+
1999-08-02 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_SRCS): Add dump.c.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 46708ac..eedf277 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6974,6 +6974,13 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
DECL_INITIAL (decl) = error_mark_node;
}
+#ifdef SET_DEFAULT_DECL_ATTRIBUTES
+ SET_DEFAULT_DECL_ATTRIBUTES (decl, attributes);
+#endif
+
+ /* Set attributes here so if duplicate decl, will have proper attributes. */
+ cplus_decl_attributes (decl, attributes, prefix_attributes);
+
if (context && TYPE_SIZE (complete_type (context)) != NULL_TREE)
{
push_nested_class (context, 2);
@@ -7031,13 +7038,6 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
decl);
}
-#ifdef SET_DEFAULT_DECL_ATTRIBUTES
- SET_DEFAULT_DECL_ATTRIBUTES (decl, attributes);
-#endif
-
- /* Set attributes here so if duplicate decl, will have proper attributes. */
- cplus_decl_attributes (decl, attributes, prefix_attributes);
-
/* Add this decl to the current binding level, but not if it
comes from another scope, e.g. a static member variable.
TEM may equal DECL or it may be a previous decl of the same name. */