https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119753
--- Comment #6 from Bogdan <love4boobies at yahoo dot com> --- (In reply to Jonathan Wakely from comment #4) > (In reply to Bogdan from comment #2) > > GCC does use the options specified in the standard. > > I think it would be more accurate to say that the standard specifies the > options that GCC (and traditional UNIX cc compilers) use. I didn't mean to express any sort of causal relationship, just one of partial equivalence. Generally speaking, they evolve together: standards are, for the most part, informed by common practice and existing solutions and the existing solutions may adapt when consensus is reached. Don't mind my phrasing. > The text you quote is new in POSIX.1-2024, so GCC's preprocessor format is > much, much older. But it only says: > > "it may contain extra information appropriate for subsequent compilation > passes and shall contain at least one line with the format ..." > > And GCC does that. So GCC is already conforming, and your scripts to process > the preprocessor output are failing to handle "extra information appropriate > for subsequent compilation passes". Indeed. This particular change to the specification is part of a set of unrelated additions to the make utility (not important but it's ticket 1325 on the Austin Group's bug tracker, in case anyone's really curious). (In reply to Jonathan Wakely from comment #5) > Ah no, it looks like GCC only emits a line in that format for the main > source file, not for the included headers. So maybe GCC could just emit one > extra line, and not remove anything from the current output. I had not considered that. This approach seems elegant as it aligns with POSIX without requiring any extra configuration on the user's part.