On Tue, 7 Nov 2006, Doug Gregor wrote: > On 11/7/06, Dale Johannesen <[EMAIL PROTECTED]> wrote: > > > > On Nov 7, 2006, at 11:47 AM, Douglas Gregor wrote: > > > > > I just read Nathan's discussion [1] on changing GCC's type system > > > to use canonical type nodes, where the comparison between two types > > > requires only a pointer comparison. Right now, we use "comptypes", > > > which typically needs to do deep structural checks to determine if > > > two types are equivalent, because we often clone _TYPE nodes. > > > > One difficulty is that compatibility of types in C is not transitive, > > especially when you're compiling more than one translation unit at a > > time. > > See the thread "IMA vs tree-ssa" in Feb-Mar 2004. Geoff Keating and > > Joseph Myers give good examples. > > In that discussion, there was mention of submitting a defect report to > the C commit about this intransitivity. Has this defect report been > resolved?
DR#314 still shows as open. In C, there are several other sources of intransitivity, such as incomplete array types (int[10] and int[5] both compatible with int[] but not with each other), unprototyped functions and enums (two enums compatible with the same integer type are not compatible with each other). -- Joseph S. Myers [EMAIL PROTECTED]