aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c40bc9c..d47c2f7 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR c++/91505
+ * decl.c (duplicate_decls): Call copy_attributes_to_builtin inside
+ the BUILT_IN_NORMAL block rather than afterward.
+
2019-08-19 Marek Polacek <polacek@redhat.com>
PR c++/91264 - detect modifying const objects in constexpr.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 08b7baa..88aa69c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2565,9 +2565,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
set_builtin_decl_declared_p (fncode, true);
break;
}
- }
- copy_attributes_to_builtin (newdecl);
+ copy_attributes_to_builtin (newdecl);
+ }
}
if (new_defines_function)
/* If defining a function declared with other language