Commit e62d5b58 by Brendan Kehoe Committed by Brendan Kehoe

typeck.c (build_unary_op): Only warn about incr/decr a pointer if pedantic || warn_pointer_arith.

	* typeck.c (build_unary_op): Only warn about incr/decr a pointer
	if pedantic || warn_pointer_arith.

From-SVN: r18118
parent 027905b4
1998-02-19 Brendan Kehoe <brendan@cygnus.com>
* typeck.c (build_unary_op): Only warn about incr/decr a pointer
if pedantic || warn_pointer_arith.
Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
* pt.c (unify): Handle TEMPLATE_DECL.
......
......@@ -4341,8 +4341,9 @@ build_unary_op (code, xarg, noconvert)
((code == PREINCREMENT_EXPR
|| code == POSTINCREMENT_EXPR)
? "increment" : "decrement"), TREE_TYPE (argtype));
else if (tmp == FUNCTION_TYPE || tmp == METHOD_TYPE
|| tmp == VOID_TYPE || tmp == OFFSET_TYPE)
else if ((pedantic || warn_pointer_arith)
&& (tmp == FUNCTION_TYPE || tmp == METHOD_TYPE
|| tmp == VOID_TYPE || tmp == OFFSET_TYPE))
cp_pedwarn ("ANSI C++ forbids %sing a pointer of type `%T'",
((code == PREINCREMENT_EXPR
|| code == POSTINCREMENT_EXPR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment