https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96383
--- Comment #16 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > So, for Ada, would you like to preserve current behavior rather than what > Richard's patch does? > If so, can't we have a langhook that decides that? > I don't know much about Ada, but would think that having the prototypes even > for functions defined in other shared libraries if they are called or > referenced in the TU is useful even for Ada. This yields useless duplication in 99.99% of the cases though and the debug info is already large enough. Can't you do this from the front-end instead, for the c-family of compilers?