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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the original example is invalid code to begin.
```
<source>:5:11: warning: declaration of 'using foo::tag = struct tag' changes
meaning of 'tag' [-Wchanges-meaning]
    5 |     using tag = tag;
      |           ^~~
<source>:5:17: note: used here to mean 'struct tag'
    5 |     using tag = tag;
      |                 ^~~
<source>:2:8: note: declared here
    2 | struct tag { };
      |        ^~~
```


But a simple change to the source:
```
struct tag { };

struct foo {
    using tag1 = tag;
};

struct bar { 
    using tag1 = tag;
};

struct foobar : foo, bar { };

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

Gets the questionable ambiguous error message without a warning.

Reply via email to