diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-06 12:39:36 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-06 12:39:36 +0000 |
commit | 62827f446f75999804f938e563a9428ecc84487e (patch) | |
tree | c32872a1f39f18b63b6c13f757df788f6cd41cae /gcc/testsuite/ChangeLog | |
parent | 1d0629d1a49ba4c9eb70f9b650cd03fde7da986a (diff) | |
download | gcc-62827f446f75999804f938e563a9428ecc84487e.tar.gz |
* c-common.c (c_expand_expr_stmt): Apply default conversions to
non-lvalue arrays if C99.
* c-typeck.c (default_conversion): Split out code handling
array-to-pointer and function-to-pointer conversions into a
separate default_function_array_conversion function.
(default_function_array_conversion): New function. Keep track of
whether any NON_LVALUE_EXPRs were stripped. Return non-lvalue
arrays unchanged outside C99 mode instead of giving an error for
them.
(build_component_ref): Use pedantic_non_lvalue when handling
COMPOUND_EXPR. Don't handle COND_EXPR specially.
(convert_arguments): Use default_function_array_conversion.
(build_unary_op): For ADDR_EXPR, take a flag indicating whether
non-lvalues are OK.
(unary_complex_lvalue): Likewise.
(internal_build_compound_expr): Use
default_function_array_conversion. Apply default conversions to
function in compound expression.
(build_c_cast, build_modify_expr, digest_init, build_asm_stmt):
Use default_function_array_conversion.
* doc/extend.texi: Update documentation of subscripting non-lvalue
arrays.
Fixes PR c/461.
testsuite:
* gcc.dg/c90-array-lval-1.c, gcc.dg/c90-array-lval-2.c,
gcc.dg/c99-array-lval-1.c, gcc.dg/c99-array-lval-2.c: Remove
XFAILs. Adjust expected error texts.
* gcc.c-torture/compile/20011106-1.c,
gcc.c-torture/compile/20011106-2.c, gcc.dg/c90-array-lval-3.c,
gcc.dg/c90-array-lval-4.c, gcc.dg/c90-array-lval-5.c,
gcc.dg/c99-array-lval-3.c, gcc.dg/c99-array-lval-4.c,
gcc.dg/c99-array-lval-5.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/ChangeLog')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2badf855779..d11a53d18b5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2001-11-06 Joseph S. Myers <jsm28@cam.ac.uk> + + * gcc.dg/c90-array-lval-1.c, gcc.dg/c90-array-lval-2.c, + gcc.dg/c99-array-lval-1.c, gcc.dg/c99-array-lval-2.c: Remove + XFAILs. Adjust expected error texts. + * gcc.c-torture/compile/20011106-1.c, + gcc.c-torture/compile/20011106-2.c, gcc.dg/c90-array-lval-3.c, + gcc.dg/c90-array-lval-4.c, gcc.dg/c90-array-lval-5.c, + gcc.dg/c99-array-lval-3.c, gcc.dg/c99-array-lval-4.c, + gcc.dg/c99-array-lval-5.c: New tests. + 2001-11-05 Neil Booth <neil@cat.daikokuya.demon.co.uk> * gcc.dg/cpp/defined.c: Update. |