On Friday 20 January 2006 18:21, Mark Mitchell wrote: > Richard Guenther wrote: > > A patch was also posted based on ideas in the audit trail. It's third > > incarnation at > > http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00967.html > > would need a review. > > This patch uses "type_i == type_j" which is usually a mistake; are we > sure we don't need the usual type-equality predicate functions?
Ah, you noticed that. So you answered your own question: > Also, why doesn't: > > union U { char c; int i; }; > struct S { union U u; }; > struct T { union U u; }; > > present the same problem between S and T? Because type_i != type_j. Maybe it fails if we use the types_compatible_p langhook, someone would have to try. Gr. Steven