This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47214] New: False warning "null argument where non-null required"
- From: "pkoning at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 16:17:51 +0000
- Subject: [Bug c/47214] New: False warning "null argument where non-null required"
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47214
Summary: False warning "null argument where non-null required"
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pkoning@gcc.gnu.org
Created attachment 22926
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22926
Test program to show the issue
I'm getting null argument warnings when there is an explicit test for non-null
right before the statement that provokes the message. The attached test
program shows this; when compiled with -Wall -O1 or -Wall -O2 you see two
warnings. Both should be suppressed; the "for" end condition is the non-null
test, and then in the second case there is an additional test right on the
statement that is rejected as well.