From f4b1a460a19666fb7b28bdc40fa5ad4aae9fbc32 Mon Sep 17 00:00:00 2001 From: rms Date: Fri, 6 Aug 1993 01:09:27 +0000 Subject: [PATCH] (attrib): Support attribute `volatile' with alias `noreturn', and `const'. (stmt): In an expr stmt, call default_conversion for arrays/functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5083 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-parse.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 7acce2a42ca..04879dc2e93 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 -- 2.11.0