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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #6 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-12-06 13:25:11 UTC ---
Clang warns:

pr48666.c:11:3: warning: array index of '4' indexes past the end of an array
(that contains 3 elements) [-Warray-bounds]
  x->val32Tab3[4] = 42;
  ^            ~
pr48666.c:5:3: note: array 'val32Tab3' declared here
  int val32Tab3[3];
  ^
1 warning generated.

It seems they took the opposite view:

http://llvm.org/bugs/show_bug.cgi?id=10871


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