[gomp] Fix -fopenmp -save-temps

Jakub Jelinek jakub@redhat.com
Wed Sep 21 12:55:00 GMT 2005


Hi!

Without this patch -fopenmp -E as well as -fopenmp -save-temps
doesn't pass #pragma omp's through into the preprocessed file.
init_pragma is called also for !flag_preprocess_only.
Ok for gomp?

2005-09-21  Jakub Jelinek  <jakub@redhat.com>

	* c-parser.c (c_parse_init): Don't register OpenMP pragmas
	if flag_preprocess_only.

--- gcc/c-parser.c.jj	2005-09-21 09:44:22.000000000 +0200
+++ gcc/c-parser.c	2005-09-21 14:38:08.000000000 +0200
@@ -278,7 +278,7 @@ c_parse_init (void)
       ridpointers [(int) reswords[i].rid] = id;
     }
 
-  if (flag_openmp)
+  if (flag_openmp && !flag_preprocess_only)
     {
       /* we want to handle deferred pragmas */
       cpp_get_options (parse_in)->defer_pragmas = true;

	Jakub



More information about the Gcc-patches mailing list