This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]