This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48666] [4.6/4.7 Regression] -Warray-bounds doesn't trigger anymore for simple case
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2011 10:26:54 +0000
- Subject: [Bug middle-end/48666] [4.6/4.7 Regression] -Warray-bounds doesn't trigger anymore for simple case
- Auto-submitted: auto-generated
- References: <bug-48666-4@http.gcc.gnu.org/bugzilla/>
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.