+2004-07-10 Steven Bosscher <stevenb@suse.de>
+ Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * c-common.c (c_common_truthvalue_conversion): Don't warn if
+ TREE_NO_WARNING is set.
+
2004-07-18 Roger Sayle <roger@eyesopen.com>
* builtins.c (simplify_builtin_memcmp, simplify_builtin_strcmp,
break;
case MODIFY_EXPR:
- if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR)
+ if (warn_parentheses
+ && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR
+ && !TREE_NO_WARNING (expr))
warning ("suggest parentheses around assignment used as truth value");
break;
+2004-07-10 Steven Bosscher <stevenb@suse.de>
+ Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
+ * decl2.c (grokfield): Don't check current_class_depth via
+ unused TREE_COMPLEXITY.
+ * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
+ to avoid the missing parentheses warning.
+ Don't set C_SET_EXP_ORIGINAL_CODE.
+
2004-07-18 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_expression): Issue a sorry for zero-operand
#define C_TYPE_FIELDS_READONLY(TYPE) \
(LANG_TYPE_CLASS_CHECK (TYPE)->fields_readonly)
-/* Store a value in that field. */
-#define C_SET_EXP_ORIGINAL_CODE(EXP, CODE) \
- (TREE_COMPLEXITY (EXP) = (int)(CODE))
-
/* The tokens stored in the default argument. */
#define DEFARG_TOKENS(NODE) \
&& TREE_CODE (declarator->u.id.name) == SCOPE_REF
&& (TREE_CODE (TREE_OPERAND (declarator->u.id.name, 1))
== IDENTIFIER_NODE))
- {
- /* Access declaration */
- if (! IS_AGGR_TYPE_CODE (TREE_CODE
- (TREE_OPERAND (declarator->u.id.name, 0))))
- ;
- else if (TREE_COMPLEXITY (declarator->u.id.name) == current_class_depth)
- pop_nested_class ();
- return do_class_using_decl (declarator->u.id.name);
- }
+ /* Access declaration */
+ return do_class_using_decl (declarator->u.id.name);
if (init
&& TREE_CODE (init) == TREE_LIST
{
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expr))))
/* This inhibits warnings in c_common_truthvalue_conversion. */
- C_SET_EXP_ORIGINAL_CODE (expr, ERROR_MARK);
+ TREE_NO_WARNING (expr) = 1;
if (TREE_CODE (expr) == OFFSET_REF)
/* [expr.unary.op]/3 The qualified id of a pointer-to-member must not be