aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-08-06 01:09:27 +0000
committerRichard Stallman <rms@gnu.org>1993-08-06 01:09:27 +0000
commitd8e29a65ddcd21f2e2cad1b8eb09fff6b96bd6fa (patch)
treea97ea54468a0330aeca3a407de715fd675d4b819
parent3550617cd5c53d0a2a7207295df8ae26e20769ad (diff)
downloadgcc-d8e29a65ddcd21f2e2cad1b8eb09fff6b96bd6fa.zip
gcc-d8e29a65ddcd21f2e2cad1b8eb09fff6b96bd6fa.tar.gz
gcc-d8e29a65ddcd21f2e2cad1b8eb09fff6b96bd6fa.tar.bz2
(attrib): Support attribute `volatile' with alias `noreturn', and `const'.
(stmt): In an expr stmt, call default_conversion for arrays/functions. From-SVN: r5083
-rw-r--r--gcc/c-parse.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 7acce2a..04879dc 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -1063,10 +1063,12 @@ attribute_list
attrib
: IDENTIFIER
- { if (strcmp (IDENTIFIER_POINTER ($1), "packed"))
+ { if (strcmp (IDENTIFIER_POINTER ($1), "packed")
+ && strcmp (IDENTIFIER_POINTER ($1), "noreturn"))
warning ("`%s' attribute directive ignored",
IDENTIFIER_POINTER ($1));
$$ = $1; }
+ | TYPE_QUAL
| IDENTIFIER '(' IDENTIFIER ')'
{ /* If not "mode (m)", then issue warning. */
if (strcmp (IDENTIFIER_POINTER ($1), "mode") != 0)
@@ -1643,6 +1645,11 @@ stmt:
| expr ';'
{ stmt_count++;
emit_line_note ($<filename>-1, $<lineno>0);
+ /* Call default_conversion to get an error
+ on referring to a register array if pedantic. */
+ if (TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
+ || TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
+ $1 = default_conversion ($1);
iterator_expand ($1);
clear_momentary (); }
| simple_if ELSE