This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug pch/13419] New: Clarification of invoke.texi requested


I hit something that I'd say is described somewhat unclearly in  
invoke.texi: for pch in conjunction with precompiling the same 
header more than once, there is a paragraph in the manual saying 
-------- 
If you need to precompile the same header file for different 
languages, targets, or compiler options, you can instead make a 
@emph{directory} named like @file{all.h.gch}, and put each precompiled 
header in the directory.  (It doesn't matter what you call the files 
in the directory, every precompiled header in the directory will be 
considered.)  The first precompiled header encountered in the 
directory that is valid for this compilation will be used; they're 
searched in no particular order. 
-------- 
 
I tried that, having a header file x.h, creating a directory 
x.h.gch, and then compiling the header file: 
  gcc -c x.h 
 
What happened is this error message: 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.h 
x.h:1: fatal error: can't open x.h.gch: Is a directory 
compilation terminated. 
 
It took me a while to understand what's going on, since of course 
x.h.gch is a directory. What would be needed is a clarification of 
above paragraph to state that one should place the precompiled 
header into this directory *by using '-o x.h.gch/something'*. If 
one does that, it of course succeeds. Alternatively, a different 
error message could also be helpful. 
 
W. 
 
 
Here's how to reproduce this: 
  echo "int i;" > x.h 
  mkdir x.h.gch 
  gcc -c x.h

-- 
           Summary: Clarification of invoke.texi requested
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: pch
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org,geoffk at gcc dot gnu
                    dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]