Re: [C++ patch] PR 20420

2012-08-23 Thread Paolo Carlini
On 08/23/2012 10:00 AM, Fabien ChĂȘne wrote: Thanks for tackling this "using" bug ! You are welcome! Incidentally, as you seem to be used to visiting old C++ bugs, feel free to ping/assign me on bugs that concern using-declarations -- obviously if you do not plan to fix it yourself (which is a

Re: [C++ patch] PR 20420

2012-08-23 Thread Fabien ChĂȘne
Hi Paolo, 2012/8/23 Jason Merrill : [...] >> The below passes testing, anyway. > > > OK. > > Jason Thanks for tackling this "using" bug ! Incidentally, as you seem to be used to visiting old C++ bugs, feel free to ping/assign me on bugs that concern using-declarations -- obviously if you do not p

Re: [C++ patch] PR 20420

2012-08-22 Thread Jason Merrill
On 08/22/2012 12:01 PM, Paolo Carlini wrote: At this point, let me know, I could either add to the testcase a templated variant like the above (see attached), or rework the code to explicitly check the underlying type (I would add locals hosting the TREE_TYPEs to shorten a bit things, etc). The

Re: [C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
Hi again, On 08/22/2012 05:13 PM, Jason Merrill wrote: On 08/22/2012 10:55 AM, Paolo Carlini wrote: . thus, in short, what is happening is that, for this testcase: class B { protected: enum E { E1, E2, E3 }; }; class D : private B { public: using B::E; private: enum E { }; }; we pa

Re: [C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
Hi again, On 08/22/2012 05:13 PM, Jason Merrill wrote: On 08/22/2012 10:55 AM, Paolo Carlini wrote: . thus, in short, what is happening is that, for this testcase: class B { protected: enum E { E1, E2, E3 }; }; class D : private B { public: using B::E; private: enum E { }; }; we pa

Re: [C++ patch] PR 20420

2012-08-22 Thread Jason Merrill
On 08/22/2012 10:55 AM, Paolo Carlini wrote: . thus, in short, what is happening is that, for this testcase: class B { protected: enum E { E1, E2, E3 }; }; class D : private B { public: using B::E; private: enum E { }; }; we parse the new declaration enum E { }; and we reach suppleme

Re: [C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
. thus, in short, what is happening is that, for this testcase: class B { protected: enum E { E1, E2, E3 }; }; class D : private B { public: using B::E; private: enum E { }; }; we parse the new declaration enum E { }; and we reach supplement_binding_1 before setting the underlying type

Re: [C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
Hi. On 08/22/2012 04:14 PM, Paolo Carlini wrote: Hi, On 08/22/2012 04:09 PM, Jason Merrill wrote: On 08/22/2012 08:43 AM, Paolo Carlini wrote: yesterday I had a look to this old PR and noticed that we are almost doing already the right thing for the original testcase: we are for classes, but

Re: [C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
Hi, On 08/22/2012 04:09 PM, Jason Merrill wrote: On 08/22/2012 08:43 AM, Paolo Carlini wrote: yesterday I had a look to this old PR and noticed that we are almost doing already the right thing for the original testcase: we are for classes, but we ICE (something recent) for enums. The latter iss

Re: [C++ patch] PR 20420

2012-08-22 Thread Jason Merrill
On 08/22/2012 08:43 AM, Paolo Carlini wrote: yesterday I had a look to this old PR and noticed that we are almost doing already the right thing for the original testcase: we are for classes, but we ICE (something recent) for enums. The latter issue seems easy to fix: handle specially enums at the

[C++ patch] PR 20420

2012-08-22 Thread Paolo Carlini
Hi, yesterday I had a look to this old PR and noticed that we are almost doing already the right thing for the original testcase: we are for classes, but we ICE (something recent) for enums. The latter issue seems easy to fix: handle specially enums at the beginning of supplement_binding_1 on