aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-30 16:15:00 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-30 16:15:00 +0000
commitc05be8671d0c5eeffdd417faad91583e791083d7 (patch)
tree205b68f7ca81a40e0ec33999911c7cd124be49b1 /gcc/config/rs6000
parent29f68d21d683541a286f85185c7e6a9a0cb21e3d (diff)
Always pass explicit location to fatal_error.
The patch <https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00698.html> adding an overload for fatal_error that passes an explicit location broke gcc.pot regeneration because xgettext cannot handle function overloads with the diagnostic string argument in different positions. As the desired direction is for all diagnostics to have explicit locations, this patch addresses the regression by removing the version of fatal_error that does not pass a location, passing explicit input_location everywhere (in the hope that those will incrementally be changed to other locations, much as with the addition of a location argument to pedwarn some time ago - a lot of cases aren't meaningfully associated with a source file so UNKNOWN_LOCATION may be better). Note that this patch does not attempt to fix any existing issues with these diagnostics (such as wrongly starting with capital letters or ending with '.' or '\n'); it just adds the input_location argument. Bootstrapped with no regressions for x86_64-unknown-linux-gnu (Go excluded). gcc: * diagnostic.c (fatal_error (const char *, ...)): Remove function. * diagnostic-core.h (fatal_error (const char *, ...)): Remove prototype. * toplev.h (init_asm_output): Update comment on use of UNKNOWN_LOCATION with fatal_error. * cgraph.c, collect-utils.c, collect2.c, config/arc/arc.c, config/arc/arc.md, config/avr/avr.c, config/c6x/c6x.h, config/darwin.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/intelmic-mkoffload.c, config/nios2/nios2.c, config/nvptx/mkoffload.c, config/nvptx/nvptx.h, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, gcc.c, gcov-io.h, gcov-tool.c, ggc-common.c, ggc-page.c, graph.c, ipa-inline-analysis.c, ipa-reference.c, lto-cgraph.c, lto-section-in.c, lto-streamer-in.c, lto-streamer.c, lto-wrapper.c, objc/objc-act.c, opts.c, passes.c, plugin.c, tlink.c, toplev.c, tree-streamer-in.c, varpool.c: All callers of fatal_error changed to pass input_location as first argument. gcc/c-family: * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/cp: * class.c, except.c, parser.c, pt.c: All callers of fatal_error changed to pass input_location as first argument. gcc/fortran: * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All callers of fatal_error changed to pass input_location as first argument. gcc/java: * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/lto: * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error changed to pass input_location as first argument. libcc1: * plugin.cc: All callers of fatal_error changed to pass input_location as first argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r--gcc/config/rs6000/host-darwin.c4
-rw-r--r--gcc/config/rs6000/rs6000.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/config/rs6000/host-darwin.c b/gcc/config/rs6000/host-darwin.c
index 3a80316bf24..6361f5c23d7 100644
--- a/gcc/config/rs6000/host-darwin.c
+++ b/gcc/config/rs6000/host-darwin.c
@@ -140,13 +140,13 @@ darwin_rs6000_extra_signals (void)
sigstk.ss_size = SIGSTKSZ;
sigstk.ss_flags = 0;
if (sigaltstack (&sigstk, NULL) < 0)
- fatal_error ("While setting up signal stack: %m");
+ fatal_error (input_location, "While setting up signal stack: %m");
sigemptyset(&sact.sa_mask);
sact.sa_flags = SA_ONSTACK | SA_SIGINFO;
sact.sa_sigaction = segv_handler;
if (sigaction (SIGSEGV, &sact, 0) < 0)
- fatal_error ("While setting up signal handler: %m");
+ fatal_error (input_location, "While setting up signal handler: %m");
}
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 40facd926f1..9bccf727fd2 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -11570,7 +11570,8 @@ def_builtin (const char *name, tree type, enum rs6000_builtins code)
gcc_assert (IN_RANGE ((int)code, 0, (int)RS6000_BUILTIN_COUNT));
if (rs6000_builtin_decls[(int)code])
- fatal_error ("internal error: builtin function %s already processed", name);
+ fatal_error (input_location,
+ "internal error: builtin function %s already processed", name);
rs6000_builtin_decls[(int)code] = t =
add_builtin_function (name, type, (int)code, BUILT_IN_MD, NULL, NULL_TREE);
@@ -15468,14 +15469,16 @@ builtin_function_type (machine_mode mode_ret, machine_mode mode_arg0,
num_args--;
if (num_args == 0)
- fatal_error ("internal error: builtin function %s had no type", name);
+ fatal_error (input_location,
+ "internal error: builtin function %s had no type", name);
ret_type = builtin_mode_to_type[h.mode[0]][h.uns_p[0]];
if (!ret_type && h.uns_p[0])
ret_type = builtin_mode_to_type[h.mode[0]][0];
if (!ret_type)
- fatal_error ("internal error: builtin function %s had an unexpected "
+ fatal_error (input_location,
+ "internal error: builtin function %s had an unexpected "
"return type %s", name, GET_MODE_NAME (h.mode[0]));
for (i = 0; i < (int) ARRAY_SIZE (arg_type); i++)
@@ -15491,7 +15494,8 @@ builtin_function_type (machine_mode mode_ret, machine_mode mode_arg0,
arg_type[i] = builtin_mode_to_type[m][0];
if (!arg_type[i])
- fatal_error ("internal error: builtin function %s, argument %d "
+ fatal_error (input_location,
+ "internal error: builtin function %s, argument %d "
"had unexpected argument type %s", name, i,
GET_MODE_NAME (m));
}