------- Comment #5 from rguenth at gcc dot gnu dot org 2007-01-31 13:38 ------- Only C++ warns for the testcase, we get C to warn as well if we remove
/* For &x[y], return x+y */ if (TREE_CODE (arg) == ARRAY_REF) { tree op0 = TREE_OPERAND (arg, 0); if (!c_mark_addressable (op0)) return error_mark_node; return build_binary_op (PLUS_EXPR, (TREE_CODE (TREE_TYPE (op0)) == ARRAY_TYPE ? array_to_pointer_conversion (op0) : op0), TREE_OPERAND (arg, 1), 1); } from c-typeck.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30636