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

            Bug ID: 94843
           Summary: if i use pch and specify '-include' twice compilation
                    fails
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m+gccbugs at gshep dot ru
  Target Milestone: ---

Hi!

The following commands give "cc1plus fatal error ./empty.h No such file or
directory ; compilation terminated."

=========================================

mkdir 111
touch 111/empty.h
echo 'int main(){ return 0; }' > a.cpp
find
g++ -g -Winvalid-pch -x c++-header -o empty.h.gch -c 111/empty.h
g++ -I. -I111 -g -Winvalid-pch -include empty.h -include empty.h -o a.o -c
a.cpp

=========================================

We encountered this issue on our project except that we have 'include
"empty.h"' in cpp source file and one '-include' command line parameter.

Is this a bug or am I missing anything? Thanks in advance.

Reply via email to