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 middle-end/48666] [4.6/4.7 Regression] -Warray-bounds doesn't trigger anymore for simple case


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 10:26:54 UTC ---
By design:

  /* Accesses to trailing arrays via pointers may access storage
     beyond the types array bounds.  */
...
      /* If this is the last field in a struct type or a field in a
         union type do not warn.  */
      if (!next)
        return;

both val32Tab2 and val32Tab3 might be allocated larger and used
as trailing array.  We'd warn during GCC bootstrap for our RTX union
for example.


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