This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/6801: void * dereference warning given when no evaluation occurs
- From: davem at redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 24 May 2002 17:48:24 -0000
- Subject: c/6801: void * dereference warning given when no evaluation occurs
- Reply-to: davem at redhat dot com
>Number: 6801
>Category: c
>Synopsis: void * dereference warning given when no evaluation occurs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 24 10:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: davem@redhat.com
>Release: 3.1
>Organization:
>Environment:
sparc-unknown-linux
>Description:
__typeof__(*ptr) *foo;
causes a warning if 'ptr' is 'void *' It warns about a
void pointer dereference, but this expression does not
evaluate, it only determines the type, so the warning appears
at best silly.
This makes some macros very hard to implement.
>How-To-Repeat:
Try to use __typeof__(*ptr) when 'ptr' is 'void *'
>Fix:
No idea.
>Release-Note:
>Audit-Trail:
>Unformatted: