Re: [PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2015-01-05 Thread Momchil Velikov
On 5.01.2015 15:55, Jason Merrill wrote: On 12/30/2014 11:24 AM, Momchil Velikov wrote: A function template enters the body of the if statement at line 1881, if (TREE_CODE (newdecl) == TEMPLATE_DECL) and exits the function at line 1951 with return olddecl; Ah, yes. The patch is

Re: [PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2014-12-30 Thread Momchil Velikov
On 30.12.2014 17:54, Jason Merrill wrote: On 12/28/2014 01:45 PM, Momchil Velikov wrote: + if (!hidden_friend) +{ + DECL_ANTICIPATED (olddecl) = 0; + DECL_HIDDEN_FRIEND_P (olddecl) = 0; +} Why not add this... @@ -2147,10 +2160,6 @@ duplicate_decls (tree newdecl, tree

Re: [PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2014-12-28 Thread Momchil Velikov
On 28.12.2014 01:36, Jason Merrill wrote: On 12/27/2014 04:38 PM, Momchil Velikov wrote: + else if (t != x && t != error_mark_node) +{ + /* This is a non-friend re-declaration of a possibly + hidden function or a function template, so don't hide

Re: [PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2014-12-27 Thread Momchil Velikov
Ping On 5.05.2014 13:06, Momchil Velikov wrote: Hello, A friend function, defined in a class and not declared outside should be hidden from ordinary name lookup and only found by argument-dependent lookup, like: struct S { friend void f() {} friend void g(const S &) {} }; int

[C++ Patch] PR 64418

2014-12-27 Thread Momchil Velikov
ble-languages=c,c++ --disable-multilib Thread model: posix gcc version 5.0.0 20141225 (experimental) [chill/list-conv revision b97cebe:8ccc35f:77c6247fdf2b97e796de45e5a2279b3a44b2f998] (GCC) without regressions, except the testcase initlist64.C, which, I believe is flawed and was fixed. /cp 2014

Re: [PATCH] Fix PR c++/60463, PR c++/60755 Incorrect discard of const qualifier

2014-05-09 Thread Momchil Velikov
Ping On 14.04.2014 23:53, Momchil Velikov wrote: Hello, During overload resolution of function calls in the body of a lambda it is possible to use an implicit/dummy 'this', which differs in const-ness from the actual 'this' that would be captured, resulting in choosin

Re: [PATCH] Fix PR c++/60994 gcc does not recognize hidden/shadowed enumeration as valid nested-name-specifier

2014-05-08 Thread Momchil Velikov
Ping. previous post: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01938.html Again bootstrapped/regtested/diffed against xg++ (GCC) 4.10.0 20140508 (experimental) [master revision ed50168:49aa3a5:e79f58c7b12f37014efb7425399c93814cddb4c4] On 29.04.2014 12:58, Momchil Velikov wrote: > He

Re: [PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2014-05-05 Thread Momchil Velikov
Bootstrapped/regtested on x86_64-linux-gnu. One test, gcc/testsuite/g++.old-deja/g++.pt/friend5.C, breaks, as it should, and was fixed. ~chill

[PATCH] Fix PR c++/59366 A friend function template defined in a class is found without ADL

2014-05-05 Thread Momchil Velikov
cd0f..b374181 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-05-05 Momchil Velikov + + PR c++/59366 + * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions + and function templates, declared only in the class. + 2014-05-03 Paolo Carlini PR c++/58582 diff -

Re: [PATCH] Fix PR c++/60463, PR c++/60755 Incorrect discard of const qualifier

2014-05-01 Thread Momchil Velikov
On 14.04.2014 23:53, Momchil Velikov wrote: Ping Hello, During overload resolution of function calls in the body of a lambda it is possible to use an implicit/dummy 'this', which differs in const-ness from the actual 'this' that would be captured, resulting in choosin

[PATCH] Fix PR c++/60994 gcc does not recognize hidden/shadowed enumeration as valid nested-name-specifier

2014-04-29 Thread Momchil Velikov
ough. Please, review this proposed fix. Bootstrapped/regtested for C/C++ on x86_64-unknown-linux-gnu. ~chill diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a5f3829..36c07a6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-04-29 Momchil Velikov +

[PATCH] Fix PR c++/60463, PE c++/60755 Incorrect discard of const qualifier

2014-04-14 Thread Momchil Velikov
b4b8b45778d] on x86_64-unknown-linux-gnu. ~chill diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bf61ab7..7308b57 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,17 @@ +2014-04-14 Momchil Velikov + + PR c++/60463 + PR c++/60755 + * lambda.c (lamb