summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-23 21:29:07 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-23 21:29:07 +0000
commitc3ceba8e8139354ec6e7fb9510bb3541d5baac23 (patch)
tree754eeef62542ff45392c946c655cc40c38bd1bed /gcc/toplev.c
parentd9253f48c6643c6b0a45f9c41cd7166986e45752 (diff)
downloadgcc-c3ceba8e8139354ec6e7fb9510bb3541d5baac23.tar.gz
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98633 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 8cfd7406291..19411e148a0 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -851,7 +851,7 @@ check_global_declarations (tree *vec, int len)
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
pedwarn ("%J%qF used but never defined", decl, decl);
else
- warning ("%J%qF declared %<static%> but never defined",
+ warning (0, "%J%qF declared %<static%> but never defined",
decl, decl);
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
@@ -877,7 +877,7 @@ check_global_declarations (tree *vec, int len)
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
&& lang_hooks.decls.warn_unused_global (decl))
- warning ("%J%qD defined but not used", decl, decl);
+ warning (0, "%J%qD defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
errors. */
@@ -900,7 +900,7 @@ warn_deprecated_use (tree node)
if (DECL_P (node))
{
expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
- warning ("%qs is deprecated (declared at %s:%d)",
+ warning (0, "%qs is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
xloc.file, xloc.line);
}
@@ -923,18 +923,18 @@ warn_deprecated_use (tree node)
expanded_location xloc
= expand_location (DECL_SOURCE_LOCATION (decl));
if (what)
- warning ("%qs is deprecated (declared at %s:%d)", what,
+ warning (0, "%qs is deprecated (declared at %s:%d)", what,
xloc.file, xloc.line);
else
- warning ("type is deprecated (declared at %s:%d)",
+ warning (0, "type is deprecated (declared at %s:%d)",
xloc.file, xloc.line);
}
else
{
if (what)
- warning ("%qs is deprecated", what);
+ warning (0, "%qs is deprecated", what);
else
- warning ("type is deprecated");
+ warning (0, "type is deprecated");
}
}
}
@@ -1187,7 +1187,7 @@ decode_d_option (const char *arg)
case 'a':
default:
if (!enable_rtl_dump_file (c))
- warning ("unrecognized gcc debugging option: %c", c);
+ warning (0, "unrecognized gcc debugging option: %c", c);
break;
}
}
@@ -1768,11 +1768,11 @@ process_options (void)
/* Warn about options that are not supported on this machine. */
#ifndef INSN_SCHEDULING
if (flag_schedule_insns || flag_schedule_insns_after_reload)
- warning ("instruction scheduling not supported on this target machine");
+ warning (0, "instruction scheduling not supported on this target machine");
#endif
#ifndef DELAY_SLOTS
if (flag_delayed_branch)
- warning ("this target machine does not have delayed branches");
+ warning (0, "this target machine does not have delayed branches");
#endif
user_label_prefix = USER_LABEL_PREFIX;
@@ -1786,7 +1786,7 @@ process_options (void)
user_label_prefix = flag_leading_underscore ? "_" : "";
}
else
- warning ("-f%sleading-underscore not supported on this target machine",
+ warning (0, "-f%sleading-underscore not supported on this target machine",
flag_leading_underscore ? "" : "no-");
}
@@ -1872,10 +1872,10 @@ process_options (void)
if (flag_var_tracking == 1)
{
if (debug_info_level < DINFO_LEVEL_NORMAL)
- warning ("variable tracking requested, but useless unless "
+ warning (0, "variable tracking requested, but useless unless "
"producing debug info");
else
- warning ("variable tracking requested, but not supported "
+ warning (0, "variable tracking requested, but not supported "
"by this debug format");
}
flag_var_tracking = 0;
@@ -1902,44 +1902,44 @@ process_options (void)
{
if (flag_function_sections)
{
- warning ("-ffunction-sections not supported for this target");
+ warning (0, "-ffunction-sections not supported for this target");
flag_function_sections = 0;
}
if (flag_data_sections)
{
- warning ("-fdata-sections not supported for this target");
+ warning (0, "-fdata-sections not supported for this target");
flag_data_sections = 0;
}
}
if (flag_function_sections && profile_flag)
{
- warning ("-ffunction-sections disabled; it makes profiling impossible");
+ warning (0, "-ffunction-sections disabled; it makes profiling impossible");
flag_function_sections = 0;
}
#ifndef HAVE_prefetch
if (flag_prefetch_loop_arrays)
{
- warning ("-fprefetch-loop-arrays not supported for this target");
+ warning (0, "-fprefetch-loop-arrays not supported for this target");
flag_prefetch_loop_arrays = 0;
}
if (flag_speculative_prefetching)
{
if (flag_speculative_prefetching_set)
- warning ("-fspeculative-prefetching not supported for this target");
+ warning (0, "-fspeculative-prefetching not supported for this target");
flag_speculative_prefetching = 0;
}
#else
if (flag_prefetch_loop_arrays && !HAVE_prefetch)
{
- warning ("-fprefetch-loop-arrays not supported for this target (try -march switches)");
+ warning (0, "-fprefetch-loop-arrays not supported for this target (try -march switches)");
flag_prefetch_loop_arrays = 0;
}
if (flag_speculative_prefetching && !HAVE_prefetch)
{
if (flag_speculative_prefetching_set)
- warning ("-fspeculative-prefetching not supported for this target (try -march switches)");
+ warning (0, "-fspeculative-prefetching not supported for this target (try -march switches)");
flag_speculative_prefetching = 0;
}
#endif
@@ -1948,13 +1948,13 @@ process_options (void)
make much sense anyway, so don't allow it. */
if (flag_prefetch_loop_arrays && optimize_size)
{
- warning ("-fprefetch-loop-arrays is not supported with -Os");
+ warning (0, "-fprefetch-loop-arrays is not supported with -Os");
flag_prefetch_loop_arrays = 0;
}
#ifndef OBJECT_FORMAT_ELF
if (flag_function_sections && write_symbols != NO_DEBUG)
- warning ("-ffunction-sections may affect debugging on some targets");
+ warning (0, "-ffunction-sections may affect debugging on some targets");
#endif
/* The presence of IEEE signaling NaNs, implies all math can trap. */