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
This commit is contained in:
parent
bc6e9a0a86
commit
baae9b65ed
@ -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>
|
2000-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* cpplib.h (struct cpp_reader): New field include_depth.
|
* cpplib.h (struct cpp_reader): New field include_depth.
|
||||||
|
@ -1217,12 +1217,12 @@ build_indirect_ref (ptr, errorstring)
|
|||||||
register tree ref = build1 (INDIRECT_REF,
|
register tree ref = build1 (INDIRECT_REF,
|
||||||
TYPE_MAIN_VARIANT (t), pointer);
|
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");
|
error ("dereferencing pointer to incomplete type");
|
||||||
return error_mark_node;
|
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");
|
warning ("dereferencing `void *' pointer");
|
||||||
|
|
||||||
/* We *must* set TREE_READONLY when dereferencing a pointer to const,
|
/* We *must* set TREE_READONLY when dereferencing a pointer to const,
|
||||||
|
Loading…
Reference in New Issue
Block a user