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]

Re: [C++ Patch] Fix 23287


Nathan Sidwell wrote:

I think it will be very hard to find them without the compiler diagnosing the issue. The problem is that in
foo->~name ();
name must be looked up in both the scope of foo's type and the scope of the whole expression. If it's found in both places, it must be the same type.


The parser is not doing this check.

The issue I found was that there are cases of
foo->~value_type ();
in member functions of template classes where Foo::value_type is one type and Klass::value_type is a different type. (char and basic_string<char> was the specific case I fell over.)

Ok, Nathan, thanks a lot for the explanations. Ideally, we should add to the C++ testsuite the reduced testcase and, at the same time, fix ext/pb_ds for these issues (perhaps it's feasible by locally reapplying your patch... maybe I will get to it in a couple of weeks...)


Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]