public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104476] New: using-decl shadowed by member function when in incomplete-class context
@ 2022-02-09 19:40 ppalka at gcc dot gnu.org
  2022-02-09 20:12 ` [Bug c++/104476] [11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-02-09 19:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104476

            Bug ID: 104476
           Summary: using-decl shadowed by member function when in
                    incomplete-class context
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

We reject the following valid testcase:

struct A {
  static void f();
};

struct B : A
{
  using A::f;         // #1
  static void f(int); // #2
  auto g() -> decltype(f());  // Call should be accepted via #1, instead
rejected
};

with

<stdin>:9:25: error: no matching function for call to ‘B::f()’
<stdin>:8:15: note: candidate: ‘static void B::f(int)’
<stdin>:8:15: note:   candidate expects 1 argument, 0 provided
<stdin>:9:25: error: no matching function for call to ‘B::f()’
<stdin>:8:15: note: candidate: ‘static void B::f(int)’
<stdin>:8:15: note:   candidate expects 1 argument, 0 provided

Yet if we swap the order of the declarations #1 and #2, then we accept the
testcase.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-05-13 15:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 19:40 [Bug c++/104476] New: using-decl shadowed by member function when in incomplete-class context ppalka at gcc dot gnu.org
2022-02-09 20:12 ` [Bug c++/104476] [11/12 Regression] " pinskia at gcc dot gnu.org
2022-02-09 20:25 ` ppalka at gcc dot gnu.org
2022-02-09 20:36 ` [Bug c++/104476] [10/11/12 " ppalka at gcc dot gnu.org
2022-02-10  0:06 ` pinskia at gcc dot gnu.org
2022-02-10  7:09 ` rguenth at gcc dot gnu.org
2022-02-17 22:58 ` jason at gcc dot gnu.org
2022-02-17 23:13 ` cvs-commit at gcc dot gnu.org
2022-02-17 23:14 ` [Bug c++/104476] [11/12 " jason at gcc dot gnu.org
2022-03-18 18:08 ` cvs-commit at gcc dot gnu.org
2022-03-18 18:09 ` [Bug c++/104476] [11 " jason at gcc dot gnu.org
2022-04-07  8:38 ` rguenth at gcc dot gnu.org
2022-04-12 20:18 ` jason at gcc dot gnu.org
2022-04-21  7:51 ` rguenth at gcc dot gnu.org
2022-05-13 15:35 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).