This is the mail archive of the gcc-patches@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] | |
Hi!
When a header file is included multiple times and has been precompiled,
gcc fails with error: calling fdopen: Bad file descriptor.
The problem is that file->fd is closed after cb.read_pch and set to -1,
so the next time should_stack_file is called on it, c_common_read_pch
which starts with fdopen (fd, "rb"); really has to fail.
The fix below clears pch (and frees pchname) once the *.gch file
is read using cb.read_pch, which means that an include file won't be
handled as a PCH file in the second and following #include (which matches
the PCH design).
Ok for trunk?
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |