From bd5b5c8584a238a7a03457ffdc4a65831e299bf1 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 7 Dec 1996 17:53:42 -0500 Subject: [PATCH] (build_indirect_ref): Don't give warning for dereferencing void * if evaluation is being skipped. From-SVN: r13235 --- gcc/c-typeck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index a5a5b009b98..7e5608c2c0d 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1320,7 +1320,7 @@ build_indirect_ref (ptr, errorstring) error ("dereferencing pointer to incomplete type"); return error_mark_node; } - if (TREE_CODE (t) == VOID_TYPE) + if (TREE_CODE (t) == VOID_TYPE && skip_evaluation == 0) warning ("dereferencing `void *' pointer"); /* We *must* set TREE_READONLY when dereferencing a pointer to const, -- 2.30.2