view gcc/testsuite/g++.dg/warn/inline3.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

struct S {
  inline virtual void foo () = 0;	// { dg-bogus "used but never defined" }
#if __cplusplus > 201703L
  constexpr virtual void bar () = 0;	// { dg-bogus "used but never defined" "" { target c++2a } }
#else
  inline virtual void bar () = 0;	// { dg-bogus "used but never defined" "" { target c++17_down }  }
#endif
  S () {}
};
struct T : public S {
  inline virtual void foo () {}
#if __cplusplus > 201703L
  constexpr virtual void bar () {}
#else
  inline virtual void bar () {}
#endif
  T () {}
};
T t;
void foo (S *s) { s->foo (); s->bar (); }