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] rename gfc_warning_cmdline to gfc_warning_now_2


This patch is mostly cleanups, sorry for the churn. The next one will
be far more interesting.

The next patch in this series will use a function
gfc_warning_now_2 that works exactly like gfc_warning_now but
uses the common diagnostics machinery. My original idea was that
this new function will take an explicit location like the ones in
the C FE. However, I realised that this will be too
disruptive. At the end, the new gfc_warning_now_2 is actually a
duplicate of gfc_warning_cmdline. Thus, this patch renames
gfc_warning_cmdline as gfc_warning_now_2 (and the same for the
_error_ variants).

In addition, I add more uses of the "new" function in several new
places (places where the name gfc_warning_cmdline does not really make
sense).

This patch also cleans up the trailing space when building the locus
and adds the space only when needed (to separate locus and prefix).

Boot&regtested on x86_64-linux-gnu.

OK?

gcc/fortran/ChangeLog:

2014-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>

    PR fortran/44054
    * gfortran.h (gfc_warning_cmdline): Rename as gfc_warning_now_2.
    (gfc_error_cmdline): Rename as gfc_error_now_2.
    * error.c (gfc_diagnostic_build_locus_prefix): Remove trailing space.
    (gfc_diagnostic_starter): Add space between locus and prefix.
    (gfc_warning_now_2): Renamed from gfc_warning_cmdline.
    (gfc_error_now_2): Renamed from gfc_error_cmdline.
    * scanner.c (add_path_to_list): Use gfc_warning_now_2.
    (load_line): Likewise.
    (load_file): Likewise.
    * options.c (gfc_post_options): Update all renamed functions.

Attachment: fortran-diagnostics-4.diff
Description: Text document


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