This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Temporarily revert Steven's PCH changes for 4.8 (PR pch/54117)
On 02/14/13 03:52, Jakub Jelinek wrote:
No, it prevents *reading* of PCH files with -gstabs, so whatever you write
into the PCH file is uninteresting. The patch can surely be acompanied
by a patch to warn that writing a PCH file is useless in that case, as in
your patch, though the spot you chose for it is too early. Consider
./xgcc -B ./ -gstabs -o aa.h.gch aa.h -g0
[ ... ]
It's a fairly minor point, but I see what you're saying.
I think two tests should be sufficient. First, compile a simple program
with -g and verify it generates dwarf2 debug records. Second verify
that there aren't any -g<foo> options, unless <foo> is dwarf2.
Supposedly not do any testing if -g (defaulting to non-dwarf) or -gstabs
etc. are present in the default options (try to pre-compile some short
header first, if that fails with the newly added warning, punt),
drop all torture options using -g in it if such test fails with explicit
-g added from the list of torture options for testing, and perhaps add some
effective target if needed (valid-1.c test?).
I'm actually on PTO today/tomorrow, so I won't be able to look further
at this until Monday.
If someone wants to run with it, my recommendation would be Steven's
warning patch, moved to the location Jakub suggests so that users know
stabs+PCH is going away plus a hack to the testsuite suite similar to
what I outlined above plus something to either suppress creation of the
pch or suppress reading the PCH in the presence of non-dwarf debug output.
Jakub -- presumably the implicit include of stdc-predef.h is what is
causing the testing differences we were seeing.