From b18d82b63b411bdc52d0650b7e5b8c5ed61a1c15 Mon Sep 17 00:00:00 2001 From: Mumit Khan Date: Tue, 3 Aug 1999 07:03:56 +0000 Subject: [PATCH] * decl.c (start_decl): Set attributes before duplicate_decls call. From-SVN: r28443 --- gcc/cp/ChangeLog | 6 +++--- gcc/cp/decl.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fab9b07ae629..6f13d4708e2a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,8 +1,8 @@ -Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com) +1999-08-03 Mumit Khan - * gcc-2.95 Released. + * decl.c (start_decl): Set attributes before duplicate_decls call. -Sun Jul 25 23:40:51 PDT 1999 Jeff Law (law@cygnus.com) +Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com) * gcc-2.95 Released. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 24968d0a670c..36f6baed068f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7339,6 +7339,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); @@ -7396,13 +7403,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. */ -- 2.47.2