https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96383
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #17) > Well, not sure - FEs do quite a good job with unused warnings by > simply tracking things with TREE_USED so I guess global extern decls > can be tracked as used/unused as well by FEs and what is a use > (and worth emitting debug for) may be better decided by the FE, > say for offsetof (X, m) we maybe want debug info for X even if it > is not otherwise used? Perhaps for C, but for C++ with thousands of inline functions everywhere pretty much everything is TREE_USED.