]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/36457 (preprocessing: option -idirafter undefined for fortran)
authorDaniel Franke <franke.daniel@gmail.com>
Tue, 9 Dec 2008 19:25:55 +0000 (14:25 -0500)
committerDaniel Franke <dfranke@gcc.gnu.org>
Tue, 9 Dec 2008 19:25:55 +0000 (14:25 -0500)
2008-12-09  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/36457
        * lang.opt: Added option idirafter.
        * cpp.h (gfc_cpp_add_include_path_after): New prototype.
* cpp.c (gfc_cpp_handle_option): Recognize and handle OPT_dirafter.
        (gfc_cpp_add_include_path_after): New, adds user-defined search path
        after any other paths.
        * invoke.texi (idirafter): New.
        (no-range-check): Fixed entry in option-index.

From-SVN: r142607

gcc/fortran/ChangeLog
gcc/fortran/cpp.c
gcc/fortran/cpp.h
gcc/fortran/invoke.texi
gcc/fortran/lang.opt

index 5c71e8f64e5521c5acd49bbcd1bdd6bcd5d43a7d..9b4bce7ac08cab36c172cb62ac8ffd954bb79652 100644 (file)
@@ -1,3 +1,14 @@
+2008-12-09  Daniel Franke  <franke.daniel@gmail.com>
+
+       PR fortran/36457
+       * lang.opt: Added option idirafter.
+       * cpp.h (gfc_cpp_add_include_path_after): New prototype.
+       * cpp.c (gfc_cpp_handle_option): Recognize and handle OPT_dirafter.
+       (gfc_cpp_add_include_path_after): New, adds user-defined search path
+       after any other paths.
+       * invoke.texi (idirafter): New.
+       (no-range-check): Fixed entry in option-index.
+
 2008-12-09  Mikael Morin  <mikael.morin@tele2.fr>
 
        PR fortran/37469
index 51c8e8507cffdb2d279dae523a498054c14a30e1..d45d0c15b7864a801c100d16c9b1074910024ae3 100644 (file)
@@ -346,6 +346,10 @@ gfc_cpp_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED
       gfc_cpp_option.working_directory = value;
       break;
 
+    case OPT_idirafter:
+      gfc_cpp_add_include_path_after (xstrdup(arg), true);
+      break;
+
     case OPT_imultilib:
       gfc_cpp_option.multilib = arg;
       break;
@@ -633,6 +637,13 @@ gfc_cpp_add_include_path (char *path, bool user_supplied)
   add_path (path, BRACKET, cxx_aware, user_supplied);
 }
 
+void
+gfc_cpp_add_include_path_after (char *path, bool user_supplied)
+{
+  int cxx_aware = 0;
+  add_path (path, AFTER, cxx_aware, user_supplied);
+}
+
 void
 gfc_cpp_register_include_paths (void)
 {
index db245021110c2ba9ec997c17f56af173a1f9076f..54a899f6a8e1e2e9623d516ee306c1f7c84a56aa 100644 (file)
@@ -41,6 +41,7 @@ gfc_try gfc_cpp_preprocess (const char *source_file);
 void gfc_cpp_done (void);
 
 void gfc_cpp_add_include_path (char *path, bool user_supplied);
+void gfc_cpp_add_include_path_after (char *path, bool user_supplied);
 
 void gfc_cpp_register_include_paths (void);
 
index 8e47df4f68468770841de3c598f67ff60ea79717..675413cf6fd5b377437b9f2af95c71989fa324dc 100644 (file)
@@ -446,6 +446,15 @@ but this can be inhibited with the negated form
 in the command line, this option has no effect, since no @code{#line}
 directives are emitted whatsoever.
 
+@item -idirafter @var{dir}
+@opindex @code{idirafter @var{dir}}
+@cindex preprocessing, include path
+Search @var{dir} for include files, but do it after all directories
+specified with @option{-I} and the standard system directories have
+been exhausted. @var{dir} is treated as a system include directory.
+If dir begins with @code{=}, then the @code{=} will be replaced by
+the sysroot prefix; see @option{--sysroot} and @option{-isysroot}.
+
 @item -imultilib @var{dir}
 @opindex @code{imultilib @var{dir}}
 @cindex preprocessing, include path
@@ -977,7 +986,7 @@ variable override the default specified by @option{-fconvert}.}
 
 
 @item -fno-range-check
-@opindex @code{-fno-range-check}
+@opindex @code{fno-range-check}
 Disable range checking of input values during integer @code{READ} operations.
 For example, GNU Fortran will give an error if an input value is
 outside of the relevant range of [@code{-HUGE()}:@code{HUGE()}]. In other words,
index 04682c191181c27105307519eda82bdbb14b78de..e49ff76ee49c0b60367d9f3291671e576a354d63 100644 (file)
@@ -360,6 +360,10 @@ fworking-directory
 Fortran
 ; Documented in C
 
+idirafter
+Fortran Joined Separate
+; Documented in C
+
 imultilib
 Fortran Joined Separate
 ; Documented in C