C++ PATCH for c++/17743, 19163 (attribute align in templates)

Jason Merrill jason@redhat.com
Wed Sep 19 00:49:00 GMT 2007

And here's the patch for using a typedef from the same class.  I didn't 
need to mess around with dependency, I just make sure that if a type 
comes from a typedef in the same class, we look up the new type of that 
typedef rather than assuming we can tsubst the type directly.

The code for finding the new typedef really strikes me as ugly, so any 
alternative suggestions would be welcome.  It seems like there ought to 
be an easier way.  But I'm pretty sure it's correct.

One thing that struck me as odd about our existing handling of typedefs: 
We don't have any indication that a type comes from a typedef unless 
there's something else different about the type (like an attribute).  I 
suppose that reduces memory consumption, but also probably makes error 
messages less helpful.

Tested x86_64-pc-linux-gnu, applied to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp-align2.patch
Type: text/x-patch
Size: 6273 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070919/0d6fe6b4/attachment.bin>

More information about the Gcc-patches mailing list