This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH Fortran] move more diagnostics to the common machinery


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  <manu@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.

Attachment: fortran-diag-cmdline.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]