(stmt): Don't call default_conversion on top-level expressions.
From-SVN: r5725
This commit is contained in:
parent
f1a2b9559f
commit
bf0add700f
@ -1648,11 +1648,18 @@ stmt:
|
|||||||
| expr ';'
|
| expr ';'
|
||||||
{ stmt_count++;
|
{ stmt_count++;
|
||||||
emit_line_note ($<filename>-1, $<lineno>0);
|
emit_line_note ($<filename>-1, $<lineno>0);
|
||||||
|
/* It appears that this should not be done--that a non-lvalue array
|
||||||
|
shouldn't get an error if the value isn't used.
|
||||||
|
Section 3.2.2.1 says that an array lvalue gets converted to a pointer
|
||||||
|
if it appears as a top-level expression,
|
||||||
|
but says nothing about non-lvalue arrays. */
|
||||||
|
#if 0
|
||||||
/* Call default_conversion to get an error
|
/* Call default_conversion to get an error
|
||||||
on referring to a register array if pedantic. */
|
on referring to a register array if pedantic. */
|
||||||
if (TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
|
if (TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
|
||||||
|| TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
|
|| TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
|
||||||
$1 = default_conversion ($1);
|
$1 = default_conversion ($1);
|
||||||
|
#endif
|
||||||
iterator_expand ($1);
|
iterator_expand ($1);
|
||||||
clear_momentary (); }
|
clear_momentary (); }
|
||||||
| simple_if ELSE
|
| simple_if ELSE
|
||||||
|
Loading…
Reference in New Issue
Block a user