diff options
author | Richard Stallman <rms@gnu.org> | 1993-08-06 01:08:12 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-08-06 01:08:12 +0000 |
commit | 3550617cd5c53d0a2a7207295df8ae26e20769ad (patch) | |
tree | 9716c2b94432969b67584ad98436b00080d72692 /gcc/c-common.c | |
parent | d11fdb45289eb406c5857ce6b1b8078f3047159c (diff) | |
download | gcc-3550617cd5c53d0a2a7207295df8ae26e20769ad.zip gcc-3550617cd5c53d0a2a7207295df8ae26e20769ad.tar.gz gcc-3550617cd5c53d0a2a7207295df8ae26e20769ad.tar.bz2 |
(decl_attributes): Support attributes `volatile'
with alias `noreturn', and `const'.
From-SVN: r5082
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index fae1e44..b5a1cdd 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -222,6 +222,17 @@ decl_attributes (decl, attributes) /* We can't set DECL_PACKED for a VAR_DECL, because the bit is used for DECL_REGISTER. It wouldn't mean anything anyway. */ } + else if (TREE_VALUE (a) == get_identifier ("noreturn") + || TREE_VALUE (a) == get_identifier ("volatile")) + { + if (TREE_CODE (decl) == FUNCTION_DECL) + TREE_THIS_VOLATILE (decl) = 1; + } + else if (TREE_VALUE (a) == get_identifier ("const")) + { + if (TREE_CODE (decl) == FUNCTION_DECL) + TREE_READONLY (decl) = 1; + } else if (TREE_VALUE (a) != 0 && TREE_CODE (TREE_VALUE (a)) == TREE_LIST && TREE_PURPOSE (TREE_VALUE (a)) == get_identifier ("mode")) |