This is the mail archive of the
mailing list for the GCC project.
Re: intermodule optimisation patch
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Geoffrey Keating <gkeating at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 May 2003 21:28:10 +0100 (BST)
- Subject: Re: intermodule optimisation patch
- References: <200305191918.h4JJIY8s006811@keatge.apple.com>
On Mon, 19 May 2003, Geoffrey Keating wrote:
> Mike Stump suggested that instead of adding extra parameters to
> comptypes() it might be better to just chase up the DECL_CONTEXT chain
> looking for a TRANSLATION_UNIT_DECL. I couldn't decide which was
> better, so I posted this version because that's the one I've tested.
C++ has a flags argument for comptypes(); it may be convenient anyway for
both front ends to have the same interface to comptypes().
> +/* Return 1 if two 'struct', 'union', or 'enum' types T1 and T2 are
> + compatible. If the two types are not the same (which has been
> + checked earlier), this can only happen when multiple translation
> + units are being compiled. See C99 6.2.7 paragraph 1 for the exact
> + rules. */
I believe the rules changed between C90 and C99 ("new struct type
compatibility rules" in the summary of C99 changes) so both versions need
to be implemented (and have testcases).
Joseph S. Myers