c-common.c (c_sizeof_or_alignof_type): Use gcc_assert.
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 30 Aug 2004 12:18:31 +0000 (12:18 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 30 Aug 2004 12:18:31 +0000 (12:18 +0000)
* c-common.c (c_sizeof_or_alignof_type): Use gcc_assert.
(handle_visibility_attribute, c_determine_visibility): Likewise.
* c-common.h (my_friendly_assert): Remove.
* cp/cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.

From-SVN: r86762

gcc/c-common.c
gcc/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index bd8ea6c32c383fd0b67255944186d6f24c57c6da..d3d03782cbb6edeede953c4ab26ea5b8325f013d 100644 (file)
@@ -2738,7 +2738,7 @@ c_sizeof_or_alignof_type (tree type, enum tree_code op, int complain)
   tree value = NULL;
   enum tree_code type_code = TREE_CODE (type);
 
-  my_friendly_assert (op == SIZEOF_EXPR || op == ALIGNOF_EXPR, 20020720);
+  gcc_assert (op == SIZEOF_EXPR || op == ALIGNOF_EXPR);
   op_name = op == SIZEOF_EXPR ? "sizeof" : "__alignof__";
 
   if (type_code == FUNCTION_TYPE)
@@ -2782,7 +2782,7 @@ c_sizeof_or_alignof_type (tree type, enum tree_code op, int complain)
      never happen.  However, this node should really have type
      `size_t', which is just a typedef for an ordinary integer type.  */
   value = fold (build1 (NOP_EXPR, size_type_node, value));
-  my_friendly_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value)), 20001021);
+  gcc_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value)));
 
   return value;
 }
@@ -4638,9 +4638,8 @@ handle_visibility_attribute (tree *node, tree name, tree args,
 bool
 c_determine_visibility (tree decl)
 {
-  my_friendly_assert (TREE_CODE (decl) == VAR_DECL
-                     || TREE_CODE (decl) == FUNCTION_DECL, 
-                     20040805);
+  gcc_assert (TREE_CODE (decl) == VAR_DECL
+             || TREE_CODE (decl) == FUNCTION_DECL);
 
   /* If the user explicitly specified the visibility with an
      attribute, honor that.  DECL_VISIBILITY will have been set during
index 86706e6e8172f5af7ddfa7fb62deb39453139252..4403ceee0fdf1431c18522ea4a04e21ca978027b 100644 (file)
@@ -650,9 +650,6 @@ extern tree c_alignof_expr (tree);
 /* Print an error message for invalid operands to arith operation CODE.
    NOP_EXPR is used as a special case (see truthvalue_conversion).  */
 extern void binary_op_error (enum tree_code);
-#define my_friendly_assert(EXP, N) (void) \
- (((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0)
-
 extern tree fix_string_type (tree);
 struct varray_head_tag;
 extern void constant_expression_warning (tree);
index 6b4bb4739f1df59933bfc0aa92cff4a06f8db8cc..9baf0ec173a2f685c0355f1445c8bcb2ebfd805e 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
+
 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
 
        * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
index 2eba7a316e422ffc7e9ed805bd41f78c90b1483e..a002ed278333fa262232212094abcca50c0fd989 100644 (file)
@@ -1425,9 +1425,8 @@ struct lang_type GTY(())
    derived class and never become non-primary.)  */
 #define SET_BINFO_NEW_VTABLE_MARKED(B)                                  \
   (BINFO_NEW_VTABLE_MARKED (B) = 1,                                     \
-   my_friendly_assert (!BINFO_PRIMARY_P (B)                             \
-                      || BINFO_VIRTUAL_P (B), 20000517),                \
-   my_friendly_assert (TYPE_VFIELD (BINFO_TYPE (B)), 20000517))
+   gcc_assert (!BINFO_PRIMARY_P (B) || BINFO_VIRTUAL_P (B)),            \
+   gcc_assert (TYPE_VFIELD (BINFO_TYPE (B))))
 
 /* Nonzero if this BINFO is a primary base class.  */