diff options
author | Daniel Franke <franke.daniel@gmail.com> | 2008-12-09 14:25:55 -0500 |
---|---|---|
committer | Daniel Franke <dfranke@gcc.gnu.org> | 2008-12-09 14:25:55 -0500 |
commit | c3280643520f0939eda33b732edaed8f900c1ee6 (patch) | |
tree | 5772bafcb49855c4aa069c0bedc8dd422509b30b | |
parent | 138b3340e66b3e030d30bfbbeb30b9a10f4677c0 (diff) | |
download | gcc-c3280643520f0939eda33b732edaed8f900c1ee6.zip gcc-c3280643520f0939eda33b732edaed8f900c1ee6.tar.gz gcc-c3280643520f0939eda33b732edaed8f900c1ee6.tar.bz2 |
re PR fortran/36457 (preprocessing: option -idirafter undefined for fortran)
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
-rw-r--r-- | gcc/fortran/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/fortran/cpp.c | 11 | ||||
-rw-r--r-- | gcc/fortran/cpp.h | 1 | ||||
-rw-r--r-- | gcc/fortran/invoke.texi | 11 | ||||
-rw-r--r-- | gcc/fortran/lang.opt | 4 |
5 files changed, 37 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5c71e8f..9b4bce7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c index 51c8e85..d45d0c1 100644 --- a/gcc/fortran/cpp.c +++ b/gcc/fortran/cpp.c @@ -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; @@ -634,6 +638,13 @@ gfc_cpp_add_include_path (char *path, bool 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) { int cxx_stdinc = 0; diff --git a/gcc/fortran/cpp.h b/gcc/fortran/cpp.h index db24502..54a899f 100644 --- a/gcc/fortran/cpp.h +++ b/gcc/fortran/cpp.h @@ -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); diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 8e47df4..675413c 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -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, diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 04682c1..e49ff76 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -360,6 +360,10 @@ fworking-directory Fortran ; Documented in C +idirafter +Fortran Joined Separate +; Documented in C + imultilib Fortran Joined Separate ; Documented in C |