public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105742] New: accepts-invalid non-dependent call to non-static member function from unrelated class in presence of dependent base
@ 2022-05-26 15:01 ppalka at gcc dot gnu.org
  2022-05-26 15:05 ` [Bug c++/105742] [9/10/11/12/13 Regression] " ppalka at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-26 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105742
           Summary: accepts-invalid non-dependent call to non-static
                    member function from unrelated class in presence of
                    dependent base
           Product: gcc
           Version: 13.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: ---

struct X {
  void g();
};

struct Y { };

template<class T>
struct A : T {
  void f() {
    using type = decltype(X::g());
  }
};

template struct A<Y>;


The call to the non-static X::g should be rejected at instantiation time
because X isn't a base of A<Y>, but instead we resolve the decltype at template
definition time and accept the testcase because we (incorrectly?) deem the call
to be non type dependent (and non instantiation dependent).

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

end of thread, other threads:[~2023-07-07 10:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 15:01 [Bug c++/105742] New: accepts-invalid non-dependent call to non-static member function from unrelated class in presence of dependent base ppalka at gcc dot gnu.org
2022-05-26 15:05 ` [Bug c++/105742] [9/10/11/12/13 Regression] " ppalka at gcc dot gnu.org
2022-05-27  6:31 ` rguenth at gcc dot gnu.org
2022-05-27  9:48 ` [Bug c++/105742] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:49 ` jakub at gcc dot gnu.org
2023-07-07 10:43 ` [Bug c++/105742] [11/12/13/14 " rguenth 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).