diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-03-24 12:27:45 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-03-24 12:27:45 +0000 |
commit | aaf932068245d39888fc1efd7f887a6d60de76e5 (patch) | |
tree | 273845d7b4dc2112d82db2e2e8f9f5239af6a84c /gcc/c-common.c | |
parent | 9e2da84c6a68dc73dfdd7ec04652ab5db8df3994 (diff) | |
download | gcc-aaf932068245d39888fc1efd7f887a6d60de76e5.zip gcc-aaf932068245d39888fc1efd7f887a6d60de76e5.tar.gz gcc-aaf932068245d39888fc1efd7f887a6d60de76e5.tar.bz2 |
Removal of separate preprocessor cpp0.
* Makefile.in (GCC_PASSES, STAGESTUFF, LIBCPP_OBJS,
cpp0, install-common): Update.
* c-common.c (flag_preprocess_only): New.
(c_common_init): Preprocess for -E.
* c-common.h (flag_preprocess_only): New.
* c-decl.c (c_decode_option): Handle -E, and -std=c++98.
* c-objc-common.c (c_init_decl_processing): Exit quickly
for NULL return from c_common_init.
* cpplib.h (cpp_preprocess_file): New.
* cppmain.c (main, general_init, pfile, progname): Remove.
(do_preprocessing): Rename cpp_preprocess_file, don't call
cpp_finish. Don't close stdout here.
(setup_callbacks): Update prototype.
* gcc.c (trad_capable_cpp, cpp_unique_options, default_compilers):
Update.
* tradcpp.c (main): Ignore -quiet.
cp:
* decl2.c (cxx_decode_option): Handle -E.
* lang-specs.h (default_compilers): Preprocess with cc1plus.
* lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
objc:
* lang-specs.h (default_compilers): Preprocess with cc1obj.
Co-Authored-By: Aldy Hernandez <aldyh@redhat.com>
From-SVN: r51256
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 228f41b..0d5e1e8 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -181,6 +181,9 @@ enum c_language_kind c_language; tree c_global_trees[CTI_MAX]; +/* Nonzero if prepreprocessing only. */ +int flag_preprocess_only; + /* Nonzero means don't recognize the non-ANSI builtin functions. */ int flag_no_builtin; @@ -4141,6 +4144,13 @@ const char * c_common_init (filename) const char *filename; { + /* NULL is passed up to toplev.c and we exit quickly. */ + if (flag_preprocess_only) + { + cpp_preprocess_file (parse_in); + return NULL; + } + /* Do this before initializing pragmas, as then cpplib's hash table has been set up. */ filename = init_c_lex (filename); |