[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-06-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

Martin Sebor  changed:

   What|Removed |Added

 CC||anders.granlund.0 at gmail dot 
com

--- Comment #8 from Martin Sebor  ---
*** Bug 67008 has been marked as a duplicate of this bug. ***

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-05-31 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

--- Comment #7 from Jason Merrill  ---
Author: jason
Date: Tue May 31 21:36:28 2016
New Revision: 236952

URL: https://gcc.gnu.org/viewcvs?rev=236952=gcc=rev
Log:
PR c++/71173 - wrong qualified lookup

PR c++/70522
* cp-tree.h (enum tag_types): Add scope_type.
* parser.c (cp_parser_class_name): Use scope_type.
(prefer_type_arg): Handle scope_type.
(cp_parser_lookup_name): Use prefer_type_arg.
* name-lookup.c (lookup_qualified_name): Change bool is_type_p to
int prefer_type, use lookup_flags.
* name-lookup.h: Adjust.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/lookup/scoped10.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/lookup/scoped9.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/cp-tree.h
branches/gcc-6-branch/gcc/cp/name-lookup.c
branches/gcc-6-branch/gcc/cp/name-lookup.h
branches/gcc-6-branch/gcc/cp/parser.c

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-05-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Wed May 25 18:29:14 2016
New Revision: 236736

URL: https://gcc.gnu.org/viewcvs?rev=236736=gcc=rev
Log:
PR c++/71173 - wrong qualified lookup

PR c++/70522
* cp-tree.h (enum tag_types): Add scope_type.
* parser.c (cp_parser_class_name): Use scope_type.
(prefer_type_arg): Handle scope_type.
(cp_parser_lookup_name): Use prefer_type_arg.
* name-lookup.c (lookup_qualified_name): Change bool is_type_p to
int prefer_type, use lookup_flags.
* name-lookup.h: Adjust.

Added:
trunk/gcc/testsuite/g++.dg/lookup/scoped10.C
trunk/gcc/testsuite/g++.dg/lookup/scoped9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/name-lookup.h
trunk/gcc/cp/parser.c

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-22 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

--- Comment #5 from Casey Carter  ---
(In reply to Jason Merrill from comment #4)
> (In reply to Casey Carter from comment #2)
> > This is a regression of sorts, FWIW, gcc 4.3 compiled it correctly
> > (http://melpon.org/wandbox/permlink/Efjfvay0U5sZvZP8) back in the day. I
> > assume that's not quite "regressive" enough for the 6 branch?
> 
> I was thinking of putting it in anyway, but that definitely strengthens the
> case.  :)

Clearly GCC6 MUST NOT SHIP until this critical bug - which has gone unnoticed
for years - is fixed. I would suggest elevating to P0 if it wasn't already
resolved ;)

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.0

--- Comment #4 from Jason Merrill  ---
(In reply to Casey Carter from comment #2)
> This is a regression of sorts, FWIW, gcc 4.3 compiled it correctly
> (http://melpon.org/wandbox/permlink/Efjfvay0U5sZvZP8) back in the day. I
> assume that's not quite "regressive" enough for the 6 branch?

I was thinking of putting it in anyway, but that definitely strengthens the
case.  :)

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Apr 22 15:38:57 2016
New Revision: 235368

URL: https://gcc.gnu.org/viewcvs?rev=235368=gcc=rev
Log:
PR c++/70522 - fix N4381 customization points

* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/lookup/friend18.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/name-lookup.c

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-21 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

Casey Carter  changed:

   What|Removed |Added

 CC||Casey at Carter dot net

--- Comment #2 from Casey Carter  ---
This is a regression of sorts, FWIW, gcc 4.3 compiled it correctly
(http://melpon.org/wandbox/permlink/Efjfvay0U5sZvZP8) back in the day. I assume
that's not quite "regressive" enough for the 6 branch?

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

--- Comment #1 from Jason Merrill  ---
Author: jason
Date: Tue Apr 19 13:40:03 2016
New Revision: 235206

URL: https://gcc.gnu.org/viewcvs?rev=235206=gcc=rev
Log:
PR c++/70522

* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.

Added:
trunk/gcc/testsuite/g++.dg/lookup/friend18.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c

[Bug c++/70522] Hidden friend functions block qualified name lookup into nested unnamed namespace

2016-04-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70522

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-04-19
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1