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

--- Comment #22 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Hi,
I have commited patch that avoids the ICE while producing warning.
However I wonder why C++ FE is silent here
$ cat 2.ii
extern "C" {
struct {
} admbaserest_;
}

We probably could warn about two things
 1) using extern "C" for anonymous types seems pointless since you can not
legally bind them anyway
 2) declaring public symbol with anonymous type seems wrong.
We could also make C++ FE to do right thing for LTO and do not declare extern
"C" anonymous types as being anonymous to the middle-end, but perhaps we just
want the codebases to be fixed anyway and with warning it should be easy to do
so?

Honza

Reply via email to