Commit baae9b65 by Zack Weinberg Committed by Zack Weinberg

c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P and VOID_TYPE_P.

	* c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P
	and VOID_TYPE_P.

From-SVN: r34835
parent bc6e9a0a
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.
......
......@@ -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,
......
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