[patch][c++/PR 31743]
Mark Mitchell
mark@codesourcery.com
Mon Jul 2 00:54:00 GMT 2007
Dave Brolley wrote:
> Yes, this works. It also removes the need to call complete_type_or_else
> at all in build_new_1. So, here's my latest patch, ChangeLog and test
> case. The patch fixes the problem and causes no regressions in the test
> suite.
Great!
This comment isn't quite accurate:
> + /* PR 31743: Make sure the array type has a known size. */
> + if (!complete_type_or_else (type, NULL_TREE))
> + return error_mark_node;
because this check isn't just about array types. Better would be:
/* The type allocated must be complete. If the new-type-id was "T[N]"
then we are just checking that "T" is complete here, but that is
equivalent, since the value of "N" doesn't matter. */
(I'm not a fan of putting PR numbers in comments; the comment ought to
stand on itself.)
OK with that change; no need to retest.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list