This is the mail archive of the
mailing list for the GCC project.
Re: intermodule optimisation patch
- From: Geoffrey Keating <geoffk at apple dot com>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: Geoffrey Keating <gkeating at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 May 2003 14:10:01 -0700
- Subject: Re: intermodule optimisation patch
On Monday, May 19, 2003, at 01:28 PM, Joseph S. Myers wrote:
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
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
to be implemented (and have testcases).
Interesting. Yes, the rules did change; in C90, you weren't required
to have the tags of the two types match. That's easily fixed.
(Now, if I only had a test framework to put the testcases into...)
Geoff Keating <firstname.lastname@example.org>