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/36299] spurious and undocumented warning with -Waddress for a == 0 when a is an array


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36299

Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.03.02 17:06:47
     Ever Confirmed|0                           |1

--- Comment #10 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-03-02 17:06:47 UTC ---
(In reply to comment #9)
> This is undefined behavior and detected by GCC, but one gets only a warning:

I am not going to waste time discussing the fine-points of what is a valid C
program. If you don't want this warning, please contribute a testcase to
gcc-patches@gcc.gnu.org, so this warning won't reappear in the future:

http://gcc.gnu.org/wiki/HowToPrepareATestcase

Otherwise, someone will come who thinks that this should be warned and they
will "fix it".


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