https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81582
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The reason it is shown in the diagnostics is that the diagnostic code opens the original, non-preprocessed source (if available) and prints the line from there. If you don't have the source around, say compile with -xc - and pipe the source on stdin, or move the preprocessed source somewhere else and compile there, such as with distcc, then you obviously don't get that comment printed. That doesn't mean the comments aren't irrecovably lost. There are many other things used by warnings lost during preprocessing, macro contexts, formatting for -Wmisleading-indentation and many others. We just need to teach users that preprocessing is a destructive thing. I've been trying to convince e.g. the ccache people to use -fdirectives-only preprocessing, but they aren't listening.