This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Small tree cleanups
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Small tree cleanups
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sun, 6 May 2001 13:16:16 +0100 (BST)
- cc: <gcc-patches at gcc dot gnu dot org>
On Sun, 6 May 2001, Neil Booth wrote:
> I've started trying to understand the C front end. This patch
> implements a few minor tweaks I've found. The compound expression
> builder was checking whether to do array to pointer conversion for the
> final element N - 1 times for an N-member compound expression. This
> simplifies the test, and only does it once.
>
> I'm doing a checking-enabled bootstrap for C, C++ and ObjC. It's
> almost completed. Assuming make check succeeds too, OK for mainline?
>
> Neil.
>
> * c-typeck.c (internal_build_compound_expr): Check for
> array to pointer conversion just once.
The C front end changes are OK. I'm not qualified to review the tree.[ch]
changes.
There are clearly actual (obscure) bugs in this area - see
gcc.dg/c9?-{array-lval,const-expr}-2.c. But getting these right
(especially the arcana of exactly what are integer constant expressions
and null pointer constants, which must be done without breaking offsetof)
is something to be done once C99 is basically implemented but before we
claim that it is. So these changes that have no effect on the compiler's
behaviour are OK.
--
Joseph S. Myers
jsm28@cam.ac.uk