diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-02-27 09:51:22 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-02-27 09:51:22 +0100 |
commit | a25a8f3be322fe0f838947b679f73d6efc2a412c (patch) | |
tree | 8f08c19e97ef9a3849f6682bc5e7ccb5dbe60947 /gcc/c-opts.c | |
parent | 9cc028fa796f06b548b472d5ceeef2c1b9b3001c (diff) | |
download | gcc-a25a8f3be322fe0f838947b679f73d6efc2a412c.zip gcc-a25a8f3be322fe0f838947b679f73d6efc2a412c.tar.gz gcc-a25a8f3be322fe0f838947b679f73d6efc2a412c.tar.bz2 |
c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL.
* c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
and CPP_PRAGMA_EOL.
* c-pragma.c (pragma_ns_name): New typedef.
(registered_pp_pragmas): New variable.
(c_pp_lookup_pragma): New function.
(c_register_pragma_1): If flag_preprocess_only, do nothing
for non-expanded pragmas, for expanded ones push pragma's
namespace and name into registered_pp_pragmas vector.
(c_invoke_pragma_handler): Register OpenMP pragmas even when
flag_preprocess_only, don't register GCC pch_preprocess
pragma if flag_preprocess_only.
* c-opts.c (c_common_init): Call init_pragma even if
flag_preprocess_only.
* c-pragma.c (c_pp_lookup_pragma): New prototype.
* config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
cpp_register_pragma if flag_preprocess_only.
* gcc.dg/gomp/preprocess-1.c: New test.
From-SVN: r132703
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r-- | gcc/c-opts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 1a59ac4..d7409ad 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1,5 +1,5 @@ /* C/ObjC/C++ command line option handling. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Neil Booth. @@ -1239,6 +1239,9 @@ c_common_init (void) if (version_flag) c_common_print_pch_checksum (stderr); + /* Has to wait until now so that cpplib has its hash table. */ + init_pragma (); + if (flag_preprocess_only) { finish_options (); @@ -1246,9 +1249,6 @@ c_common_init (void) return false; } - /* Has to wait until now so that cpplib has its hash table. */ - init_pragma (); - return true; } |