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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |97729
   Last reconfirmed|2015-09-04 00:00:00         |2020-11-5

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We don't emit any constructors or destructors that are marked used.

This is a problem for libstdc++ now.

struct S {
    S();
    ~S();
    S(const S&);
};

[[gnu::used]] inline S::S()  { }
[[gnu::used]] inline S::~S() { }
[[gnu::used]] inline S::S(const S&) { }

This generates no code with GCC. Clang emits all three functions.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97729
[Bug 97729] [11 Regression] Link failure due to basic_stringbuf and others when
building DLL on MinGW

Reply via email to