On Mar 30, 2005, at 10:36 PM, Per Bothner wrote:

* Note that we compile the gch file as it were the main file
- i.e. it has the MAIN_FILE_P property, and it is not included
from any file.

Another side effect, it bypasses system header check.

    gcc -x c-header /usr/include/stdio.h

Here, stdio.h is main input file but it is not recognized as a
system header.

This means the restored line_table is slightly
anomalous.  One solution to this is when we generate the gch file,
we pretend the .h file is included in a dummy file, which we
may call <main>.  This adds two line_map entries: one for <main>
before the LC_ENTER of the .h file, and one at the end to LC_LEAVE
the .h file.  Then when we restore, we patch both of these to
replace "<main>" by the real main file name.

- Devang



Reply via email to