This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Mark, all,This is the sort of situation where I think we should be much more brutal.Below you will find my second try, which tries to implement your suggestions. Tested x86_64-linux.Rather than trying to make add_friend -- and every other function that might be called as we try to build up members of a erroneous class -- we should short-circuit the whole process. I would suggest we just skip everything inside the erroneous class -- look for the matching closing brace and be done with it. That will no doubt eliminate a bunch of crashses, making the compiler more robust. The downside, of course, is that the user may not get errors about things within the erroneous class until they fix the class -- but with a class that makes no sense, it's not clear that there's a whole lot in there we can be intelligent about.+ template<typename...> struct A; + + template<typename...T> struct A<T*> // { dg-error "not expanded|T" } + { // { dg-error "not expanded|T" } + friend void foo(); + };
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |