Commit c3280643 by Daniel Franke Committed by Daniel Franke

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
parent 138b3340
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> 2008-12-09 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/37469 PR fortran/37469
......
...@@ -346,6 +346,10 @@ gfc_cpp_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED ...@@ -346,6 +346,10 @@ gfc_cpp_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED
gfc_cpp_option.working_directory = value; gfc_cpp_option.working_directory = value;
break; break;
case OPT_idirafter:
gfc_cpp_add_include_path_after (xstrdup(arg), true);
break;
case OPT_imultilib: case OPT_imultilib:
gfc_cpp_option.multilib = arg; gfc_cpp_option.multilib = arg;
break; break;
...@@ -634,6 +638,13 @@ gfc_cpp_add_include_path (char *path, bool user_supplied) ...@@ -634,6 +638,13 @@ gfc_cpp_add_include_path (char *path, bool user_supplied)
} }
void 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) gfc_cpp_register_include_paths (void)
{ {
int cxx_stdinc = 0; int cxx_stdinc = 0;
......
...@@ -41,6 +41,7 @@ gfc_try gfc_cpp_preprocess (const char *source_file); ...@@ -41,6 +41,7 @@ gfc_try gfc_cpp_preprocess (const char *source_file);
void gfc_cpp_done (void); void gfc_cpp_done (void);
void gfc_cpp_add_include_path (char *path, bool user_supplied); 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); void gfc_cpp_register_include_paths (void);
......
...@@ -446,6 +446,15 @@ but this can be inhibited with the negated form ...@@ -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} in the command line, this option has no effect, since no @code{#line}
directives are emitted whatsoever. 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} @item -imultilib @var{dir}
@opindex @code{imultilib @var{dir}} @opindex @code{imultilib @var{dir}}
@cindex preprocessing, include path @cindex preprocessing, include path
...@@ -977,7 +986,7 @@ variable override the default specified by @option{-fconvert}.} ...@@ -977,7 +986,7 @@ variable override the default specified by @option{-fconvert}.}
@item -fno-range-check @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. Disable range checking of input values during integer @code{READ} operations.
For example, GNU Fortran will give an error if an input value is 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, outside of the relevant range of [@code{-HUGE()}:@code{HUGE()}]. In other words,
......
...@@ -360,6 +360,10 @@ fworking-directory ...@@ -360,6 +360,10 @@ fworking-directory
Fortran Fortran
; Documented in C ; Documented in C
idirafter
Fortran Joined Separate
; Documented in C
imultilib imultilib
Fortran Joined Separate Fortran Joined Separate
; Documented in C ; Documented in C
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment