diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-04-17 21:27:37 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-04-17 21:27:37 +0000 |
commit | 220a35cc8e39aa6e6a846fefee1a7bf460a339cc (patch) | |
tree | 04d97fa13059a1054b2c7ec7fbb770b3edcc84fb /gcc/c-decl.c | |
parent | 1ca4c6e1e8914fa27d1b869cd60d2ed40501e097 (diff) | |
download | gcc-220a35cc8e39aa6e6a846fefee1a7bf460a339cc.zip gcc-220a35cc8e39aa6e6a846fefee1a7bf460a339cc.tar.gz gcc-220a35cc8e39aa6e6a846fefee1a7bf460a339cc.tar.bz2 |
re PR c/10375 (Function-local external decls of builtins don't get attributes)
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* c-decl.c (duplicate_decls): Preserve "const" and "noreturn"
function attributes.
* cp/decl.c (duplicate_decls): Preserve "const", "noreturn"
and "nothrow" function attributes.
* f/com.c (duplicate_decls): Preserve "const" and "noreturn"
function attributes.
From-SVN: r65753
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 0614476..c852bd7 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1377,6 +1377,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level) DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl); DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl) |= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl); + TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl); + TREE_READONLY (newdecl) |= TREE_READONLY (olddecl); DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl); DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl); } |