]> gcc.gnu.org Git - gcc.git/commitdiff
c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P and VOID_TYPE_P.
authorZack Weinberg <zack@wolery.cumb.org>
Sun, 2 Jul 2000 19:19:18 +0000 (19:19 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sun, 2 Jul 2000 19:19:18 +0000 (19:19 +0000)
* c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P
and VOID_TYPE_P.

From-SVN: r34835

gcc/ChangeLog
gcc/c-typeck.c

index fad11bd56d135267fd124bd1f768954a2eec7f14..bff247983ccf6c800d92f597fdaff564492354ac 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P
+       and VOID_TYPE_P.
+
 2000-07-02  Jakub Jelinek  <jakub@redhat.com>
 
        * cpplib.h (struct cpp_reader): New field include_depth.
index c882dd9038631c73e0699e3883bf7d5efb0eb7e5..f057be7cc78012f96c8829c663f7595c3e2a1533 100644 (file)
@@ -1217,12 +1217,12 @@ build_indirect_ref (ptr, errorstring)
          register tree ref = build1 (INDIRECT_REF,
                                      TYPE_MAIN_VARIANT (t), pointer);
 
-         if (!COMPLETE_TYPE_P (t) && TREE_CODE (t) != ARRAY_TYPE)
+         if (!COMPLETE_OR_VOID_TYPE_P (t) && TREE_CODE (t) != ARRAY_TYPE)
            {
              error ("dereferencing pointer to incomplete type");
              return error_mark_node;
            }
-         if (TREE_CODE (t) == VOID_TYPE && skip_evaluation == 0)
+         if (VOID_TYPE_P (t) && skip_evaluation == 0)
            warning ("dereferencing `void *' pointer");
 
          /* We *must* set TREE_READONLY when dereferencing a pointer to const,
This page took 0.087577 seconds and 5 git commands to generate.