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]

[Bug c/47214] New: False warning "null argument where non-null required"


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.


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