Applied, thanks.
Jason
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
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 OK, then, but still needs ChangeLog and tes
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 o
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 olddecl, bool
newdecl_is_friend
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
+ it. */
+
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
+it. */
+ DECL_ANTI
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
main()
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
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
main()
{
f(); // error
g(S()); // correct, found by AD
10 matches
Mail list logo