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] |
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 plus colors! The other new function is for errors instead of warnings. Perhaps there are more places where these functions can be used. Surprisingly, options that are not Common and not handled explicitly in gfc_handle_option were rejected. This is fixed by this patch since such options are handled automatically by the common options machinery. Bootstrapped and regression tested on x86_64-linux-gnu. OK? gcc/fortran/ChangeLog: 2014-10-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * gfortran.h (gfc_warning_cmdline): Add overload that takes an option. (gfc_error_cmdline): Declare. * error.c (gfc_warning_cmdline): New overload that takes an option. (gfc_error_cmdline): New. * lang.opt (Wmissing-include-dirs): New. * scanner.c (add_path_to_list): Use the new functions. (load_file): Likewise. * options.c (gfc_init_options): Wmissing-include-dirs is enabled by default in Fortran. (gfc_handle_option): Accept automatically handled options.
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] |