This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36299] spurious and undocumented warning with -Waddress for a == 0 when a is an array
- From: "vincent at vinc17 dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Mar 2011 15:05:29 +0000
- Subject: [Bug c/36299] spurious and undocumented warning with -Waddress for a == 0 when a is an array
- Auto-submitted: auto-generated
- References: <bug-36299-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36299
--- Comment #5 from Vincent LefÃvre <vincent at vinc17 dot org> 2011-03-01 15:05:19 UTC ---
Under Debian, I can no longer reproduce the problem with GCC 4.5.2:
$ gcc-4.5 -Wall warn-nulladdress.c
$ gcc-4.5 -Waddress warn-nulladdress.c
$ gcc-4.4 -Wall warn-nulladdress.c
warn-nulladdress.c: In function âmainâ:
warn-nulladdress.c:14: warning: the address of âaâ will never be NULL
$ gcc-4.4 -Waddress warn-nulladdress.c
warn-nulladdress.c: In function âmainâ:
warn-nulladdress.c:14: warning: the address of âaâ will never be NULL
So, I assume that it has been fixed anyway. Do you confirm?