Re: TYPE_UID(node) macro value

2011-03-03 Thread Michael Matz
Hi, On Wed, 2 Mar 2011, Kyle Girard wrote: > > > Can I count on the uid for a type in a header to be the same across > > > all compilation units that use that header? > > > > ... no. > > > > Is there anyway in gcc to get a unique id for a type that would be the > same across compilation unit

Re: TYPE_UID(node) macro value

2011-03-02 Thread Ian Lance Taylor
Kyle Girard writes: > Is there anyway in gcc to get a unique id for a type that would be the > same across compilation units? Or would I have to come up with my own > encoding somehow? I don't know of anything like that in gcc today. The first thing you need to do is define when two types are

Re: TYPE_UID(node) macro value

2011-03-02 Thread Kyle Girard
> It's simply a counter incremented each time a type node is created (see > next_type_uid), hence ... > Thanks the info. > > Can I count on the uid for a type in a header to be the same across all > > compilation units that use that header? > > ... no. > Is there anyway in gcc to get a uni

Re: TYPE_UID(node) macro value

2011-03-02 Thread Michael Matz
Hi, On Wed, 2 Mar 2011, Kyle Girard wrote: > Question, how is the uid for a type calculated? What are the > contributing factors? It's simply a counter incremented each time a type node is created (see next_type_uid), hence ... > Can I count on the uid for a type in a header to be the same acr