]> gcc.gnu.org Git - gcc.git/commitdiff
re PR driver/31694 (__GFORTRAN__ preprocessor macro)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 7 May 2007 05:48:24 +0000 (05:48 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 7 May 2007 05:48:24 +0000 (05:48 +0000)
PR driver/31694
* c-opts.c (lang_fortran): Make it non static.
* c-common.h (lang_fortran): New prototype.
* c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the
-lang-fortran option was passed by the driver.

From-SVN: r124495

gcc/ChangeLog
gcc/c-common.h
gcc/c-cppbuiltin.c
gcc/c-opts.c

index 1272b72af1471f65dc331e6f3bbb962c54d5565c..f523f3ac578d891092745075c28e1111b0762f92 100644 (file)
@@ -1,3 +1,11 @@
+2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR driver/31694
+       * c-opts.c (lang_fortran): Make it non static.
+       * c-common.h (lang_fortran): New prototype.
+       * c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the
+       -lang-fortran option was passed by the driver.
+
 2007-05-06  Eric Botcazou  <ebotcazou@adacore.com>
 
        * timevar.c (timevar_print): Test ENABLE_ASSERT_CHECKING instead
index d4afaec45354b5049e794c95f51aeb0cb6622cbc..5e97211cb178092aa43f663d93e99373400ec957 100644 (file)
@@ -254,6 +254,8 @@ extern c_language_kind c_language;
 #define c_dialect_cxx()                (c_language & clk_cxx)
 #define c_dialect_objc()       (c_language & clk_objc)
 
+extern bool lang_fortran;
+
 /* Information about a statement tree.  */
 
 struct stmt_tree_s GTY(()) {
index c36b038bc77e298f7b1ac1cb561cf21ca5cfa8b8..cc19ce5dd7df5eab04c6fdfd33403ac898aae76c 100644 (file)
@@ -569,6 +569,9 @@ c_cpp_builtins (cpp_reader *pfile)
   if (flag_openmp)
     cpp_define (pfile, "_OPENMP=200505");
 
+  if (lang_fortran)
+    cpp_define (pfile, "__GFORTRAN__=1");
+
   builtin_define_type_sizeof ("__SIZEOF_INT__", integer_type_node);
   builtin_define_type_sizeof ("__SIZEOF_LONG__", long_integer_type_node);
   builtin_define_type_sizeof ("__SIZEOF_LONG_LONG__",
index e378f377a0ceff4b45de32bcdc4a902a95cd5925..a41362a9829a26dbd61f5522eb7cc14ace3a8d53 100644 (file)
@@ -73,7 +73,7 @@ static bool deps_seen;
 static bool verbose;
 
 /* If -lang-fortran seen.  */
-static bool lang_fortran = false;
+bool lang_fortran = false;
 
 /* Dependency output file.  */
 static const char *deps_file;
This page took 0.078837 seconds and 5 git commands to generate.