[PATCH] Fix preprocessing of macro expanded pragmas (take 2)

Joseph S. Myers joseph@codesourcery.com
Wed Feb 27 00:58:00 GMT 2008


On Tue, 26 Feb 2008, Jakub Jelinek wrote:

> 2008-02-26  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* 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.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list