aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2015-05-16 12:30:04 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2015-05-16 12:30:04 +0000
commit40de31cfe4e8959e5f92c82aa34550693897d29c (patch)
treed5fb030b786fbff87791b001e5569a9bc1e25370
parent26c666565d347bd91fb86466d68ed578ac798ea6 (diff)
downloadgcc-40de31cfe4e8959e5f92c82aa34550693897d29c.zip
gcc-40de31cfe4e8959e5f92c82aa34550693897d29c.tar.gz
gcc-40de31cfe4e8959e5f92c82aa34550693897d29c.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/fortran/ChangeLog: 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 Replace all calls to gfc_notify_std_1 with gfc_notify_std and gfc_warning_1 with gfc_warning. * decl.c (gfc_verify_c_interop_param): Here. * resolve.c (resolve_branch): Here. (resolve_fl_derived): Here. * dependency.c (gfc_check_argument_var_dependency): * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line counter and locations before and after warning. * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1): Delete. (gfc_warning_now_at): Declare. * error.c (gfc_warning_1): Delete. (gfc_notify_std_1): Delete. (gfc_warning_now_1): Delete. (gfc_format_decoder): Handle two locations. (gfc_diagnostic_build_prefix): Rename as gfc_diagnostic_build_kind_prefix. (gfc_diagnostic_build_locus_prefix): Take an expanded_location instead of diagnostic_info. (gfc_diagnostic_build_locus_prefix): Add overload that takes two expanded_location. (gfc_diagnostic_starter): Handle two locations. (gfc_warning_now_at): New. (gfc_diagnostics_init): Initialize caret_chars array. (gfc_diagnostics_finish): Reset caret_chars array to default. gcc/cp/ChangeLog: 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * error.c (cp_diagnostic_starter): Use diagnostic_location function. (cp_print_error_function): Likewise. (cp_printer): Replace locus pointer with accessor function. gcc/c/ChangeLog: 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * c-objc-common.c (c_tree_printer): Replace locus pointer with accessor function. gcc/ChangeLog: 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * tree-pretty-print.c (percent_K_format): Replace locus pointer with accessor function. * tree-diagnostic.c (diagnostic_report_current_function): Use diagnostic_location function. (maybe_unwind_expanded_macro_loc): Likewise. (virt_loc_aware_diagnostic_finalizer): Likewise. (default_tree_printer): Replace locus pointer with accessor function. * diagnostic.c (diagnostic_initialize): Initialize caret_chars array. (diagnostic_set_info_translated): Initialize second location. (diagnostic_build_prefix): Use CARET_LINE_MARGIN. (diagnostic_show_locus): Handle two locations. Call diagnostic_print_caret_line. (diagnostic_print_caret_line): New. (default_diagnostic_starter): Use diagnostic_location function. (diagnostic_report_diagnostic): Use diagnostic_location function. (verbatim): Do not set text.locus. * diagnostic.h (struct diagnostic_info): Remove location field. (struct diagnostic_context): Make caret_chars an array of two. (diagnostic_location): New inline. (diagnostic_expand_location): Handle two locations. (diagnostic_same_line): New inline. (diagnostic_print_caret_line): Declare. (CARET_LINE_MARGIN): New constant. * pretty-print.c (pp_printf): Do not set text.locus. (pp_verbatim): Do not set text.locus. * pretty-print.h (MAX_LOCATIONS_PER_MESSAGE): New constant. (struct text_info): Replace locus pointer with locations array. Add accessor functions. gcc/testsuite/ChangeLog: 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * lib/gfortran-dg.exp: Update regex to handle two locations for the same diagnostic without caret. * gfortran.dg/badline.f: Test also that line numbers are correct before and after "left but not entered" warning. From-SVN: r223236
-rw-r--r--gcc/ChangeLog32
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/fortran/ChangeLog30
-rw-r--r--gcc/testsuite/ChangeLog8
5 files changed, 84 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84e282a..1f2a4ab 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,35 @@
+2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/44054
+ * tree-pretty-print.c (percent_K_format): Replace locus pointer
+ with accessor function.
+ * tree-diagnostic.c (diagnostic_report_current_function): Use
+ diagnostic_location function.
+ (maybe_unwind_expanded_macro_loc): Likewise.
+ (virt_loc_aware_diagnostic_finalizer): Likewise.
+ (default_tree_printer): Replace locus pointer with accessor function.
+ * diagnostic.c (diagnostic_initialize): Initialize caret_chars array.
+ (diagnostic_set_info_translated): Initialize second location.
+ (diagnostic_build_prefix): Use CARET_LINE_MARGIN.
+ (diagnostic_show_locus): Handle two locations. Call
+ diagnostic_print_caret_line.
+ (diagnostic_print_caret_line): New.
+ (default_diagnostic_starter): Use diagnostic_location function.
+ (diagnostic_report_diagnostic): Use diagnostic_location function.
+ (verbatim): Do not set text.locus.
+ * diagnostic.h (struct diagnostic_info): Remove location field.
+ (struct diagnostic_context): Make caret_chars an array of two.
+ (diagnostic_location): New inline.
+ (diagnostic_expand_location): Handle two locations.
+ (diagnostic_same_line): New inline.
+ (diagnostic_print_caret_line): Declare.
+ (CARET_LINE_MARGIN): New constant.
+ * pretty-print.c (pp_printf): Do not set text.locus.
+ (pp_verbatim): Do not set text.locus.
+ * pretty-print.h (MAX_LOCATIONS_PER_MESSAGE): New constant.
+ (struct text_info): Replace locus pointer with locations
+ array. Add accessor functions.
+
2015-05-16 Kugan Vivekanandarajah <kuganv@linaro.org>
Zhenqiang Chen <zhenqiang.chen@linaro.org>
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index ebf9759..6ef290f 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/44054
+ * c-objc-common.c (c_tree_printer): Replace locus pointer with
+ accessor function.
+
2015-05-14 Marek Polacek <polacek@redhat.com>
PR c/66066
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b119f7b..210b177 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/44054
+ * error.c (cp_diagnostic_starter): Use diagnostic_location
+ function.
+ (cp_print_error_function): Likewise.
+ (cp_printer): Replace locus pointer with accessor function.
+
2015-05-12 David Malcolm <dmalcolm@redhat.com>
* parser.c (cp_parser_selection_statement): Add location and
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c06627e..7cff476 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,33 @@
+2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/44054
+
+ Replace all calls to gfc_notify_std_1 with gfc_notify_std and
+ gfc_warning_1 with gfc_warning.
+ * decl.c (gfc_verify_c_interop_param): Here.
+ * resolve.c (resolve_branch): Here.
+ (resolve_fl_derived): Here.
+ * dependency.c (gfc_check_argument_var_dependency):
+ * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
+ counter and locations before and after warning.
+ * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
+ Delete.
+ (gfc_warning_now_at): Declare.
+ * error.c (gfc_warning_1): Delete.
+ (gfc_notify_std_1): Delete.
+ (gfc_warning_now_1): Delete.
+ (gfc_format_decoder): Handle two locations.
+ (gfc_diagnostic_build_prefix): Rename as
+ gfc_diagnostic_build_kind_prefix.
+ (gfc_diagnostic_build_locus_prefix): Take an expanded_location
+ instead of diagnostic_info.
+ (gfc_diagnostic_build_locus_prefix): Add overload that takes two
+ expanded_location.
+ (gfc_diagnostic_starter): Handle two locations.
+ (gfc_warning_now_at): New.
+ (gfc_diagnostics_init): Initialize caret_chars array.
+ (gfc_diagnostics_finish): Reset caret_chars array to default.
+
2015-05-16 Mikael Morin <mikael@gcc.gnu.org
Paul Thomas <pault@gcc.gnu.org>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 430e6bd..7260828 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/44054
+ * lib/gfortran-dg.exp: Update regex to handle two locations for
+ the same diagnostic without caret.
+ * gfortran.dg/badline.f: Test also that line numbers are correct
+ before and after "left but not entered" warning.
+
2015-05-16 Kugan Vivekanandarajah <kuganv@linaro.org>
Zhenqiang Chen <zhenqiang.chen@linaro.org>