1. 06 Nov, 2001 1 commit
    • re PR c/461 (non-lvalue arrays) · 207bf485
      	* 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.
      
      From-SVN: r46805
      Joseph Myers committed
  2. 13 Aug, 2000 1 commit
    • In gcc/: · 05273f08
      	* c-typeck.c (build_array_ref): Don't complain about non-lvalue
      	arrays in C99.  Don't try to look at DECL_REGISTER of a
      	COMPONENT_REF.  Don't complain twice about the same error.
      
      In gcc/testsuite/:
      	* gcc.dg/c99-array-lval-1.c: The test on line 14 now passes.
      
      From-SVN: r35666
      Geoff Keating committed
  3. 10 Aug, 2000 1 commit