Discussion:
[PATCH Fortran] move more diagnostics to the common machinery
Manuel López-Ibáñez
2014-10-03 21:29:44 UTC
Permalink
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.
Manuel López-Ibáñez
2014-10-04 14:05:32 UTC
Permalink
Post by Manuel López-Ibáñez
The following patch adds two new functions. One of them is an overload
Don't review this one just yet. I must have messed up testing or new
testcases appeared because after doing 'svn up' some testcases
started failing. I am testing a new patch.

Cheers,

Manuel.

Loading...