This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Small tree cleanups

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]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]