+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.
((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)