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 tree-optimization/56273] [4.8 regression] Bogus -Warray-bounds warning


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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-02-12 23:50:03 UTC ---
(In reply to comment #9)
> ../../../gcc-trunk/libgcc/crtstuff.c: In function 'frame_dummy':
> ../../../gcc-trunk/libgcc/crtstuff.c:463:19: warning: array subscript is above
> array bounds [-Warray-bounds]
>    if (__JCR_LIST__[0])
> 
> is this real or bogus?

Real and bogus at the same time.
STATIC void *__JCR_LIST__[]
  __attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void*))))
  = { };

So it has a size of 0 so reading 0 is above the array bounds but this is not
normal code.


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