diff options
author | Richard Stallman <rms@gnu.org> | 1993-10-11 03:04:47 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-10-11 03:04:47 +0000 |
commit | bf0add700f0d605df10d2081911b56ced7386b84 (patch) | |
tree | 26af474c267b6574815147d9037403521ca10518 /gcc/c-parse.in | |
parent | f1a2b9559f41a54c52fff5e1f3b98c85c5a1b3dd (diff) | |
download | gcc-bf0add700f0d605df10d2081911b56ced7386b84.tar.gz |
(stmt): Don't call default_conversion on top-level expressions.
From-SVN: r5725
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 1add87f24bc..2d6c965a26a 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1648,11 +1648,18 @@ stmt: | expr ';' { stmt_count++; 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 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); +#endif iterator_expand ($1); clear_momentary (); } | simple_if ELSE |