From d8e29a65ddcd21f2e2cad1b8eb09fff6b96bd6fa Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 6 Aug 1993 01:09:27 +0000 Subject: (attrib): Support attribute `volatile' with alias `noreturn', and `const'. (stmt): In an expr stmt, call default_conversion for arrays/functions. From-SVN: r5083 --- gcc/c-parse.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc') 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 ($-1, $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 -- cgit v1.1