https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67819
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Patrick Palka from comment #1) > Sorry if this has been discussed before, but can't you use > linemap_location_from_macro_expansion_p to check whether the conditional > contains a macro expansion, and to inhibit the warning if so? Answered my own question: no, because e.g. integer constants expanded from macros don't have locations, from this thread: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01599.html