diff options
author | DJ Delorie <dj@redhat.com> | 2005-04-23 17:29:07 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2005-04-23 17:29:07 -0400 |
commit | d4ee4d252515ac2d2bdb8ed085edc7feaf5b943d (patch) | |
tree | 754eeef62542ff45392c946c655cc40c38bd1bed /gcc/cp/cvt.c | |
parent | 6084512671ee4909d6428506d46d09ee1a90cbdf (diff) | |
download | gcc-d4ee4d252515ac2d2bdb8ed085edc7feaf5b943d.zip gcc-d4ee4d252515ac2d2bdb8ed085edc7feaf5b943d.tar.gz gcc-d4ee4d252515ac2d2bdb8ed085edc7feaf5b943d.tar.bz2 |
diagnostic.c (warning): Accept parameter to classify warning option.
* 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.
From-SVN: r98633
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 32dc96d..5150fcf 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -194,7 +194,7 @@ cp_convert_to_pointer (tree type, tree expr, bool force) if (bk == bk_via_virtual) { if (force) - warning ("pointer to member cast from %qT to %qT is via" + warning (0, "pointer to member cast from %qT to %qT is via" " virtual base", intype, type); else { @@ -512,7 +512,7 @@ convert_to_reference (tree reftype, tree expr, int convtype, if (TREE_CODE (intype) == POINTER_TYPE && (comptypes (TREE_TYPE (intype), type, COMPARE_BASE | COMPARE_DERIVED))) - warning ("casting %qT to %qT does not dereference pointer", + warning (0, "casting %qT to %qT does not dereference pointer", intype, reftype); rval = build_unary_op (ADDR_EXPR, expr, 0); @@ -854,10 +854,10 @@ convert_to_void (tree expr, const char *implicit) int is_complete = COMPLETE_TYPE_P (complete_type (type)); if (is_volatile && !is_complete) - warning ("object of incomplete type %qT will not be accessed in %s", + warning (0, "object of incomplete type %qT will not be accessed in %s", type, implicit ? implicit : "void context"); else if (is_reference && is_volatile) - warning ("object of type %qT will not be accessed in %s", + warning (0, "object of type %qT will not be accessed in %s", TREE_TYPE (TREE_OPERAND (expr, 0)), implicit ? implicit : "void context"); if (is_reference || !is_volatile || !is_complete) @@ -873,7 +873,7 @@ convert_to_void (tree expr, const char *implicit) int is_complete = COMPLETE_TYPE_P (complete_type (type)); if (TYPE_VOLATILE (type) && !is_complete) - warning ("object %qE of incomplete type %qT will not be accessed in %s", + warning (0, "object %qE of incomplete type %qT will not be accessed in %s", expr, type, implicit ? implicit : "void context"); break; } @@ -895,7 +895,7 @@ convert_to_void (tree expr, const char *implicit) } else if (implicit && probe == expr && is_overloaded_fn (probe)) /* Only warn when there is no &. */ - warning ("%s is a reference, not call, to function %qE", + warning (0, "%s is a reference, not call, to function %qE", implicit, expr); } @@ -906,7 +906,7 @@ convert_to_void (tree expr, const char *implicit) /* The middle end does not warn about expressions that have been explicitly cast to void, so we must do so here. */ if (!TREE_SIDE_EFFECTS (expr)) - warning ("%s has no effect", implicit); + warning (0, "%s has no effect", implicit); else { tree e; @@ -938,7 +938,7 @@ convert_to_void (tree expr, const char *implicit) || code == PREINCREMENT_EXPR || code == POSTDECREMENT_EXPR || code == POSTINCREMENT_EXPR))) - warning ("value computed is not used"); + warning (0, "value computed is not used"); } } expr = build1 (CONVERT_EXPR, void_type_node, expr); @@ -1046,7 +1046,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain) if (expr == null_node && (desires & WANT_INT) && !(desires & WANT_NULL)) - warning ("converting NULL to non-pointer type"); + warning (0, "converting NULL to non-pointer type"); basetype = TREE_TYPE (expr); |