c/6801: void * dereference warning given when no evaluation occurs

davem@redhat.com davem@redhat.com
Fri May 24 10:56:00 GMT 2002


>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:



More information about the Gcc-bugs mailing list