[Bug driver/28528] New: [4.0/4.1/4.2 regression] Trouble compiling header files with "-x c++" using g++

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 28 13:42:00 GMT 2006


The g++ driver has problems with *.h files compiled with "-x c++":
  g++ -c -x c++ file.h
yields a precompiled header file.h.gch instead of file.o.
  g++ -S -x c++ file.h
yields an error message:
  cc1plus: error: output filename specified twice

With "-x c" everything works as expected. Also using gcc (and not g++)
with "-x c", "-x c++", "-x c-header", "-x c++-header" works fine.

This is a reression from GCC 3.3.x where using
  g++ -c -x c++ file.h
or
  g++ -S -x c++ file.h
led to the desired results.


-- 
           Summary: [4.0/4.1/4.2 regression] Trouble compiling header files
                    with "-x c++" using g++
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28528



More information about the Gcc-bugs mailing list