https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89358
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
So I ended up with:
--- 1.ii ---
struct a {};
struct b : a {
} c;
--- 2.ii ---
cat 2.ii
struct a {};
struct b : a {
} c2;
$ g++ -flto -c -std=c++14 1.ii && g++ -flto -c -std=c++17 2.ii && g++ [12].o
-shared
1.ii:2:8: warning: type ‘struct b’ violates the C++ One Definition Rule [-Wodr]
struct b : a {
^
2.ii:2:8: note: a type with different bases is defined in another translation
unit
struct b : a {
^