[C++ PATCH] Don't create an INTEGER_CST for aggregates (empty structs)

Andrew Pinski pinskia@physics.uc.edu
Thu Mar 10 17:43:00 GMT 2005


The C++ front-end creates an INTEGER_CST with a record type which seems 
wrong and
could cause bugs in the future.  This patch fixes it by creating an 
empty
constructor instead which is the correct thing to do.  I found this 
while looking
into how to fix PR 20408 and I had originally thought this was the 
cause of that
PR.  Anyways we create these for empty structs only when we are 
gimplifing
EMPTY_CLASS_EXPR.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* cp-gimplify.c (cp_gimplify_expr) <case EMPTY_CLASS_EXPR>: Create an
	empty CONSTRUCTOR instead of an INTEGER_CST of zero.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050310/5176fbe3/attachment.txt>


More information about the Gcc-patches mailing list