https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71930

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(1) so what?  The behavior for - input without -x is the same for all drivers. 
gfortran -E - will not preprocess as if it is Fortran source, gcj -E - will not
preprocess as if it is a Java source (after all, there is no preprocessing for
Java), etc.
And (2), the fact that -std=c++17 is C++/ObjC++ specific option is not known to
the driver, all it knows is that it should pass options starting with -std down
to the preprocessor and/or compiler.  Why should that affect which preprocessor
is used?  Should it pick up ObjC++ or C++?

There is a standard option to choose the language, and that is -x.  If the
source has an extension, then the language is generally determined from the
file extension (but it can be still overridden).  -std= is just about choosing
a particular revision of the language.

Reply via email to