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

--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Other ideas for fixing:

(a) (hackish workaround?): defer emitting diagnostics from
__attribute__((__error__)) and __attribute__((__warning__)) until a
postprocessing stage, after all functions have been emitted, and then determine
which functions are actually reachable, and only emit the diagnostics if the
functions are callable

(b) add an interprocedural sync-up before "final", so that we do an
interprocedural elimination of uncallable internal functions before emitting
assembler, and move the attribute diagnostics from "expand" to "final".

Reply via email to