https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71930
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- What makes you think that this is a bug? If the source is on stdin, then obviously file extension determination of the source type doesn't apply, so you need to supply it explicitly, using -xc or -xc++ etc. Without -x and with - input, the driver errors unless -E is used, in which case it is always the C preprocessing. The driver doesn't try to guess that because you've used some C++-ish option you want C++ preprocessing. Just use -xc++.