public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115343] New: Member name lookup does not consider equivalent type aliases from different base classes to be equivalent.
@ 2024-06-04 10:01 email at miropalmu dot cc
  2024-06-04 18:27 ` [Bug c++/115343] " pinskia at gcc dot gnu.org
  2024-06-04 18:29 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: email at miropalmu dot cc @ 2024-06-04 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115343
           Summary: Member name lookup does not consider equivalent type
                    aliases from different base classes to be equivalent.
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: email at miropalmu dot cc
  Target Milestone: ---

In following code foo::tag and bar::tag are type aliases to the same type so
member name lookup in foobar::tag should merge them and not be ambiguous.

However GCC 15.0.0 20240604 gives error about ambiguity.


```https://godbolt.org/z/fsK7ET4bY

struct tag { };

struct foo {
    using tag = tag;
};

struct bar { 
    using tag = tag;
};

struct foobar : foo, bar { };

int main() {
    foobar::tag _;
}
```

Clang is able to compile the code and it would make sense to no be ambiguous
but I'm not 100% sure, so someone with more familiarity with
[class.member.lookup] section of the standard can correct me if I'm wrong.

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

end of thread, other threads:[~2024-06-04 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-04 10:01 [Bug c++/115343] New: Member name lookup does not consider equivalent type aliases from different base classes to be equivalent email at miropalmu dot cc
2024-06-04 18:27 ` [Bug c++/115343] " pinskia at gcc dot gnu.org
2024-06-04 18:29 ` pinskia 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).