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



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-05-22 20:00 -------

  if (a == 0)
    return 1;
  else if (a == (void *) 0)

Those two should warn about being address being zero.  "a" decays to a pointer
type and really &a[0].

-- Pinski


-- 


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


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