This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r185445 - in /branches/pph/gcc: c-family/Change...
- From: crowl at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 15 Mar 2012 22:08:13 -0000
- Subject: r185445 - in /branches/pph/gcc: c-family/Change...
Author: crowl
Date: Thu Mar 15 22:08:12 2012
New Revision: 185445
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185445
Log:
This patch mostly adds several test cases reduced from full-scale attempts to
use PPH.
c?anonymous* -- problems handling anonymous/tagless types
c?features* -- problems with benign macro redefinitions
x?tmpldfltparm* -- inappropriately merging default template arguments
It also add an option -fpph-check to refine our check for headers compatible
with PPH. It implies -fprimary-system-header-okay and checks for the main
source file missing a guard. Generating a pph file implies the same check.
Tested on x64.
Index: gcc/c-family/ChangeLog.pph
2012-03-15 Lawrence Crowl <crowl@google.com>
* c.opt (-fpph-check): New.
* c-opts.c (c_common_handle_option): Add OPT_fpph_check.
(case OPT__output_pph_): Also imply -fpph-check.
* c-common.h (bool pph_check_main_missing_guard): New.
* c-common.c (bool pph_check_main_missing_guard): New.
(const char *pph_out_file): Explicitly initialize to NULL.
Index: gcc/testsuite/ChangeLog.pph
2012-03-15 Lawrence Crowl <crowl@google.com>
* g++.dg/pph/c0anonymous.h: New.
* g++.dg/pph/c1anonymous1.h: New.
* g++.dg/pph/c1anonymous2.h: New.
* g++.dg/pph/c5features1.h: New.
* g++.dg/pph/c5features2.h: New.
* g++.dg/pph/c7features.cc: New.
* g++.dg/pph/d8dupguard.cc: Add xfail-if comment.
* g++.dg/pph/x0tmpldfltparm.h: New.
* g++.dg/pph/x1tmpldfltparm.cc: New.
* g++.dg/pph/y9overload.cc: Add xfail-if comment.
Index: gcc/cp/ChangeLog.pph
2012-03-15 Lawrence Crowl <crowl@google.com>
* pph.h (pph_check_main_guarded): New.
* pph-core.c (pph_check_main_guarded): New.
* pph-out.c (pph_writer_finish): Factor out guard check into
pph_check_main_guarded.
* parser.c (c_parse_file): Add guard check for non-pph compiles.
Added:
branches/pph/gcc/testsuite/g++.dg/pph/c0anonymous.h
branches/pph/gcc/testsuite/g++.dg/pph/c1anonymous1.h
branches/pph/gcc/testsuite/g++.dg/pph/c1anonymous2.h
branches/pph/gcc/testsuite/g++.dg/pph/c5features1.h
branches/pph/gcc/testsuite/g++.dg/pph/c5features2.h
branches/pph/gcc/testsuite/g++.dg/pph/c7features.cc
branches/pph/gcc/testsuite/g++.dg/pph/x0tmpldfltparm.h
branches/pph/gcc/testsuite/g++.dg/pph/x1tmpldfltparm.cc
Modified:
branches/pph/gcc/c-family/ChangeLog.pph
branches/pph/gcc/c-family/c-common.c
branches/pph/gcc/c-family/c-common.h
branches/pph/gcc/c-family/c-opts.c
branches/pph/gcc/c-family/c.opt
branches/pph/gcc/cp/ChangeLog.pph
branches/pph/gcc/cp/parser.c
branches/pph/gcc/cp/pph-core.c
branches/pph/gcc/cp/pph-out.c
branches/pph/gcc/cp/pph.h
branches/pph/gcc/testsuite/ChangeLog.pph
branches/pph/gcc/testsuite/g++.dg/pph/d8dupguard.cc
branches/pph/gcc/testsuite/g++.dg/pph/y9overload.cc