Manuel López-Ibáñez
2014-10-03 21:29:44 UTC
The following patch adds two new functions. One of them is an overload
of gfc_warning_cmdline() that takes an option. Thus now we get:
f951: Warning: Nonexistent include directory
'C:\msys\1.0.10\home\FX\ibin\i586-pc-mingw32\libgfortran/../../../trunk/libgfortran/generated'
[-Wmissing-include-dirs]
plus colors!
and of course, with -Werror=missing-include-dirs you get:
f951: Error: Nonexistent include directory
'C:\msys\1.0.10\home\FX\ibin\i586-pc-mingw32\libgfortran/../../../trunk/libgfortran/generated'
[-Werror=missing-include-dirs]
f951: some warnings being treated as errors
The other new function is for errors instead of warnings. Perhaps
there are more places where these functions can be used.
Bootstrapped and regression tested on x86_64-linux-gnu.
OK?
gcc/fortran/ChangeLog:
2014-10-03 Manuel López-Ibáñez <***@gcc.gnu.org>
* gfortran.h (gfc_warning_cmdline): Add overload variant taking an
option.
(gfc_error_cmdline): Declare.
* error.c (gfc_warning_cmdline): New
(gfc_error_cmdline): New.
* scanner.c (add_path_to_list): Use them.
(load_file): Likewise.
of gfc_warning_cmdline() that takes an option. Thus now we get:
f951: Warning: Nonexistent include directory
'C:\msys\1.0.10\home\FX\ibin\i586-pc-mingw32\libgfortran/../../../trunk/libgfortran/generated'
[-Wmissing-include-dirs]
plus colors!
and of course, with -Werror=missing-include-dirs you get:
f951: Error: Nonexistent include directory
'C:\msys\1.0.10\home\FX\ibin\i586-pc-mingw32\libgfortran/../../../trunk/libgfortran/generated'
[-Werror=missing-include-dirs]
f951: some warnings being treated as errors
The other new function is for errors instead of warnings. Perhaps
there are more places where these functions can be used.
Bootstrapped and regression tested on x86_64-linux-gnu.
OK?
gcc/fortran/ChangeLog:
2014-10-03 Manuel López-Ibáñez <***@gcc.gnu.org>
* gfortran.h (gfc_warning_cmdline): Add overload variant taking an
option.
(gfc_error_cmdline): Declare.
* error.c (gfc_warning_cmdline): New
(gfc_error_cmdline): New.
* scanner.c (add_path_to_list): Use them.
(load_file): Likewise.