This is the mail archive of the gcc-patches@gcc.gnu.org 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 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
jsm28@cam.ac.uk


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