[PATCH] Fix pch failures when opening a header that has been precompiled multiple times (PR pch/13675)

Geoff Keating geoffk@geoffk.org
Mon Mar 31 20:13:00 GMT 2008


On 31/03/2008, at 12:17 PM, Jakub Jelinek wrote:
> On Mon, Mar 31, 2008 at 12:06:15PM -0600, Tom Tromey wrote:
>>>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
>>
>> Jakub> The fix below clears pch (and frees pchname) once the *.gch
>> Jakub> file is read using cb.read_pch, which means that an include
>> Jakub> file won't be handled as a PCH file in the second and  
>> following
>> Jakub> #include (which matches the PCH design).
>>
>> Jakub> This patch also removes unnecessary field from struct  
>> _cpp_file
>> Jakub> (file->pch is true iff file->pchname != NULL) and fixes a
>> Jakub> double close bug
>>
>> This looks good to me.
>
> Thanks.
>
>> I don't think I can approve the c-pch.c part.
>
> Joseph, are you ok with that change?
>
> BTW, from what I see, cmacro isn't being written into the *.gch/*  
> files
> and isn't read back when reading the PCH file.

The header may have changed between when the PCH is written and when  
it is read, so the old cmacro may not apply.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2460 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080331/88e99255/attachment.p7s>


More information about the Gcc-patches mailing list