[patch] Merge dwarf4 branch

Jason Merrill jason@redhat.com
Thu Oct 1 21:17:00 GMT 2009


On 10/01/2009 02:21 PM, Cary Coutant wrote:
>> Why just those?  Why not just hash the name and context whenever you see a
>> reference to a class type?  I think you can also get a reference to an
>> incomplete class if another class declares a member function with a
>> parameter of that type, but that function isn't defined or called in the
>> current translation unit.
>
> We talked about that in the DWARF workgroup, but as I recall, there
> was a preference to doing the deep hash wherever possible (i.e., when
> it wouldn't lead to different results depending on whether a
> declaration was complete or incomplete). In the case you mention, we
> specifically do a shallow hash for member functions: see the code just
> a little bit further down, where it outputs the 'S' marker (and I need
> to fix the comment there to say "Checksum the child DIEs, except for
> nested types *and member functions*").

Hmm.  So if the function signature changes, the type signature of the 
enclosing class doesn't.  That doesn't affect the layout of the class, 
but it might cause confusing overload resolution in the debugger.

I'm not sure I agree that's preferable to always shallow hashing class 
AT_type.  Certainly it will limit the ODR checking that you can do.

Jason



More information about the Gcc-patches mailing list