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

            Bug ID: 67023
           Summary: "g++" does not set preprocessor language to C++ when
                    reading from standard input
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

You would expect this to expand the __cplusplus macro:

    echo __cplusplus | g++ -E -

but when reading from standard input the language is automatically set to C,
even when using the g++ driver.

In contrast, without -E there is no language set automatically and a -x option
must be used, which just makes the 'g++ -E -' behaviour even more likely to
confuse, as in https://gcc.gnu.org/ml/gcc-help/2015-07/msg00103.html

Reply via email to