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]
Other format: [Raw text]

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 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).

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 <>

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