[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2019-02-06 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 Alan Modra changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2019-02-06 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 --- Comment #4 from Eric Gallager --- (In reply to Jan-Benedict Glaw from comment #2) > With today's binutils snapshot, there's a gas_assert in front of it, which > silences this bogus warning. That needs to be reverted to test GCC wrt. this > is

[Bug tree-optimization/80202] [6 Regression] Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion

2018-10-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80202 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Bug tree-optimization/80202] [6 Regression] Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion

2017-11-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80202 Richard Biener changed: What|Removed |Added Target Milestone|--- |6.5

[Bug tree-optimization/80202] Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion

2017-07-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80202 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #2

[Bug c++/80202] Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion

2017-03-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80202 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/80202] New: Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion

2017-03-26 Thread mchtly at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80202 Bug ID: 80202 Summary: Spurious warning "array subscript is below array bounds" with if-statement and char to unsigned int conversion Product: gcc Vers

[Bug middle-end/61520] False warning: array subscript is below array bounds (-Warray-bounds -O -ftree-vrp -funroll-loops)

2017-01-31 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61520 Jeffrey A. Law changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 Alan Modra changed: What|Removed |Added Target||x86_64-linux Status|UNCONFIRMED

[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 Alan Modra changed: What|Removed |Added CC||amodra at gmail dot com --- Comment #3 from

[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 --- Comment #2 from Jan-Benedict Glaw --- With today's binutils snapshot, there's a gas_assert in front of it, which silences this bogus warning. That needs to be reverted to test GCC wrt. this issue.

[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-07 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 Jan-Benedict Glaw changed: What|Removed |Added Version|4.9.1 |5.0 --- Comment #1 from Jan-Benedict

[Bug c/63197] New: tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-06 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197 Bug ID: 63197 Summary: tc-m68k.c: Wrong warning "array subscript is below array bounds" Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severi

[Bug c/61520] False warning: array subscript is below array bounds (-Warray-bounds -O -ftree-vrp -funroll-loops)

2014-06-17 Thread vuvova at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61520 --- Comment #1 from Sergei Golubchik --- A slightly modified version: static const int powers10[]= { 0, 1, 10, 100 }; int remove_leading_zeroes(unsigned int decimals, unsigned int var) { decimals%= 2; while (var < powers10[decimals

[Bug c/61520] New: False warning: array subscript is below array bounds (-Warray-bounds -O -ftree-vrp -funroll-loops)

2014-06-16 Thread svojtovich at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61520 Bug ID: 61520 Summary: False warning: array subscript is below array bounds (-Warray-bounds -O -ftree-vrp -funroll-loops) Product: gcc Version: 4.8.1 Status: UNCONFIRMED

[Bug c++/42124] warning: array subscript is below array bounds

2012-10-15 Thread djszapi at archlinux dot us
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42124 --- Comment #4 from Laszlo Papp 2012-10-15 12:42:50 UTC --- Great, thank you! :-)

[Bug c++/42124] warning: array subscript is below array bounds

2012-10-15 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42124 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|gcc-

[Bug tree-optimization/43002] invalid "warning: array subscript is below array bounds" with -fwrapv

2010-02-09 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-02-09 10:10 --- Without -fwrapv I get > ./cc1 -quiet -O2 -Wall t3.i t3.i: In function 'foo': t3.i:8:5: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false and with -fwrapv and the fix fo

[Bug tree-optimization/43002] invalid "warning: array subscript is below array bounds" with -fwrapv

2010-02-08 Thread zsojka at seznam dot cz
--- Comment #2 from zsojka at seznam dot cz 2010-02-08 21:37 --- Created an attachment (id=19826) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19826&action=view) original, unreduced testcase Preprocessed gcc/fold-const.c - this problem blocks bootstrap with BOOT_CFLAGS="-O2 -fwra

[Bug tree-optimization/43002] invalid "warning: array subscript is below array bounds" with -fwrapv

2010-02-08 Thread zsojka at seznam dot cz
--- Comment #1 from zsojka at seznam dot cz 2010-02-08 21:35 --- Created an attachment (id=19825) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19825&action=view) reduced testcase While this may look artificial, it was reduced from gcc/fold-const.c -- http://gcc.gnu.org/bugzi

[Bug tree-optimization/43002] New: invalid "warning: array subscript is below array bounds" with -fwrapv

2010-02-08 Thread zsojka at seznam dot cz
: In function ‘foo’: testcase.c:9:9: warning: array subscript is below array bounds -- Summary: invalid "warning: array subscript is below array bounds" with -fwrapv Product: gcc Version: 4.5.0 Status: UNCONFIRMED

[Bug c++/42124] warning: array subscript is below array bounds

2009-11-20 Thread djszapi at archlinux dot us
--- Comment #2 from djszapi at archlinux dot us 2009-11-20 19:59 --- (In reply to comment #1) > D.2919_10 = C39PAT[0][-2147483647]; > > Well there is an array subscript is below array bounds. > > It is hard for GCC to figure out that is dead code really without full > unrolling ... >

[Bug c++/42124] warning: array subscript is below array bounds

2009-11-20 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-11-20 19:12 --- D.2919_10 = C39PAT[0][-2147483647]; Well there is an array subscript is below array bounds. It is hard for GCC to figure out that is dead code really without full unrolling ... -- pinskia at gcc dot gnu dot o

[Bug c++/42124] New: warning: array subscript is below array bounds

2009-11-20 Thread djszapi at archlinux dot us
guages=c,c++,fortran,objc,obj-c++ --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix gcc version 4.4.1 (GCC)

[Bug c++/40658] spurious warning "array subscript is below array bounds"

2009-07-06 Thread manu at gcc dot gnu dot org
--- Comment #4 from manu at gcc dot gnu dot org 2009-07-06 11:21 --- This is FIXED in GCC 4.4. There may be a 4.3.4 release but this is not a regression and nobody seems interested in investigating whether it can be fixed with a minimal patch. So I am closing it as FIXED. If you can rep

[Bug c++/40658] spurious warning "array subscript is below array bounds"

2009-07-06 Thread gcc at axel-naumann dot de
--- Comment #3 from gcc at axel-naumann dot de 2009-07-06 10:59 --- OK, I didn't know that the branch is closed, nor that it involves extensive changes. Sorry it took me so long to find this! I can of course use #pragma GCC diagnostic ignored "-Warray-bounds" if needed. -- http://gc

[Bug c++/40658] spurious warning "array subscript is below array bounds"

2009-07-06 Thread paolo dot carlini at oracle dot com
--- Comment #2 from paolo dot carlini at oracle dot com 2009-07-06 09:57 --- I'm afraid it's highly unlikely that this will be fixed in 4_3-branch... To the best of my knowledge, fixing it involved a few rather invasive patches and the branch is close to its end of life... -- http:

[Bug c++/40658] spurious warning "array subscript is below array bounds"

2009-07-06 Thread mikpe at it dot uu dot se
--- Comment #1 from mikpe at it dot uu dot se 2009-07-06 09:32 --- Ditto here on powerpc64-unknown-linux-gnu. -m32 gives the warning, -m64 does not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40658

[Bug c++/40658] New: spurious warning "array subscript is below array bounds"

2009-07-06 Thread gcc at axel-naumann dot de
Compiling the following code snippet with "g++ -m32 -S -Wall -O2 t.cc" on a 64bit machine issues a warning t.cc: In static member function 'static void NewDelFunctionsT::deleteArray_T(void*) [with T = EcalTPGLut]': t.cc:12: warning: array subscript is below array bounds This

warning: array subscript is below array bounds

2009-06-09 Thread George Kirpichev
LENGTH]; W8 data[MSG_MAX_DATALEN]; /* 4- or 8-octet alignment */ } MSGBUF_T; Should the code snippet produce the warning: warning: array subscript is below array bounds And why if should? >From my point of view type cast is more prioritized operation, thus it should be ok. But seems, that g

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2009-06-02 Thread at dot wufei at gmail dot com
--- Comment #7 from at dot wufei at gmail dot com 2009-06-03 05:07 --- Did the patch fixes the second case (struct B)? It still warns on 4.3 branch, but no problem on 4.4. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35593

[Bug middle-end/36633] [4.4 Regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-31 Thread jason at gcc dot gnu dot org
--- Comment #17 from jason at gcc dot gnu dot org 2008-07-31 17:41 --- The offending optimization in forwprop2 seems to have been disabled on the trunk. I also just checked in a patch to simplify the code generated for new, though it doesn't seem to have been the problem in this PR. -

[Bug middle-end/36633] [4.4 Regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-31 Thread jason at gcc dot gnu dot org
--- Comment #16 from jason at gcc dot gnu dot org 2008-07-31 17:39 --- Subject: Bug 36633 Author: jason Date: Thu Jul 31 17:38:08 2008 New Revision: 138425 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138425 Log: PR c++/36633 * init.c (build_new_1): Don't conve

[Bug middle-end/36633] [4.4 Regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-29 Thread jason at gcc dot gnu dot org
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org

[Bug middle-end/36633] [4.4 Regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-18 Thread rguenth at gcc dot gnu dot org
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Keywords||diagnostic Known to work||4.3.1

[Bug middle-end/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-11 Thread paolo dot carlini at oracle dot com
--- Comment #15 from paolo dot carlini at oracle dot com 2008-07-11 21:36 --- I'm tentatively recategorizing as middle-end, if I'm missing something just override me... -- paolo dot carlini at oracle dot com changed: What|Removed |Added --

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread mark at codesourcery dot com
--- Comment #14 from mark at codesourcery dot com 2008-07-10 14:58 --- Subject: Re: [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall rguenther at suse dot de wrote: > Can the FE mark this array-access with TREE_NO_WARNING?

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread rguenther at suse dot de
--- Comment #13 from rguenther at suse dot de 2008-07-10 14:07 --- Subject: Re: [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall On Thu, 10 Jul 2008, paolo dot carlini at oracle dot com wrote: > --- Comment #12 from paol

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread paolo dot carlini at oracle dot com
--- Comment #12 from paolo dot carlini at oracle dot com 2008-07-10 13:53 --- The warning is bogus, for sure. The issue is how / where to fix it. Apparently it comes from check_array_ref in tree-vrp.c, outside the C++ front-end indeed. First thing, we should probably figure out what is

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread chris dot fairles at gmail dot com
--- Comment #11 from chris dot fairles at gmail dot com 2008-07-10 13:41 --- On x64_64, alignof(smart_ptr) == sizeof(size_t) == 8. So then the size of the array is stored in the 8 bytes prior to the address of the returned pointer from new[]. In the delete[] call, its offsetting the r

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread paolo dot carlini at oracle dot com
--- Comment #10 from paolo dot carlini at oracle dot com 2008-07-10 09:57 --- Thanks Mark, frankly I didn't know about "cookies". By the way, naively, the fact that the warning is emitted only for -O2 doesn't indicate to me a pure front-end issue... -- http://gcc.gnu.org/bugzilla/s

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-09 Thread mark at codesourcery dot com
--- Comment #9 from mark at codesourcery dot com 2008-07-10 03:42 --- Subject: Re: [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall paolo dot carlini at oracle dot com wrote: > Mark, could you possibly comment on this PR? W

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-09 Thread paolo dot carlini at oracle dot com
--- Comment #8 from paolo dot carlini at oracle dot com 2008-07-09 22:49 --- Mark, could you possibly comment on this PR? With some good hints I could even try to work on it... -- paolo dot carlini at oracle dot com changed: What|Removed |Added --

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-04 Thread jsm28 at gcc dot gnu dot org
-- jsm28 at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36633

[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread paolo dot carlini at oracle dot com
-- paolo dot carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last re

[Bug c++/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2008-06-25 21:00 --- (In reply to comment #5) > This bug is similar to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35593 which > is fixed in mainline. It is like that but this one is really the C++ front-end emitting weird trees to begi

[Bug c++/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2008-06-25 20:59 --- D.2148_2 = (struct D[7] *) D.2168_1; D.2149_3 = D.2148_2 + 8; D.2169_4 = (long unsigned int *) D.2149_3; D.2170_5 = D.2169_4 + -8; That seems wrong. Why are we going from a struct D[7] * to a long unsigned

[Bug middle-end/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
--- Comment #5 from chris dot fairles at gmail dot com 2008-06-25 20:59 --- This bug is similar to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35593 which is fixed in mainline. -- chris dot fairles at gmail dot com changed: What|Removed |Added ---

[Bug middle-end/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
--- Comment #4 from chris dot fairles at gmail dot com 2008-06-25 20:56 --- Adding CC as requested. -- chris dot fairles at gmail dot com changed: What|Removed |Added

[Bug middle-end/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
--- Comment #3 from chris dot fairles at gmail dot com 2008-06-25 20:55 --- Created an attachment (id=15816) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15816&action=view) File from tree dump with the negative subscript index -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3

[Bug middle-end/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
--- Comment #2 from chris dot fairles at gmail dot com 2008-06-25 20:54 --- Created an attachment (id=15815) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15815&action=view) File from tree dump before subscript operator appears. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=

[Bug middle-end/36633] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
--- Comment #1 from chris dot fairles at gmail dot com 2008-06-25 20:53 --- Created an attachment (id=15814) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15814&action=view) Test case that issues warning with compiling with -O2,-Wall -- http://gcc.gnu.org/bugzilla/show_bug.cg

[Bug middle-end/36633] New: warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-06-25 Thread chris dot fairles at gmail dot com
8_15); -- Summary: warning "array subscript is below array bounds" on delete [] with -O2, -Wall Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo:

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-18 Thread rguenth at gcc dot gnu dot org
--- Comment #6 from rguenth at gcc dot gnu dot org 2008-03-18 17:28 --- And the branch. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-18 Thread rguenth at gcc dot gnu dot org
--- Comment #5 from rguenth at gcc dot gnu dot org 2008-03-18 17:24 --- Subject: Bug 35593 Author: rguenth Date: Tue Mar 18 17:23:35 2008 New Revision: 133318 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133318 Log: 2008-03-18 Richard Guenther <[EMAIL PROTECTED]> Ba

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-15 Thread rguenth at gcc dot gnu dot org
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35593

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-15 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2008-03-15 16:09 --- Fixed on the trunk. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Sever

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-15 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2008-03-15 14:28 --- Subject: Bug 35593 Author: rguenth Date: Sat Mar 15 14:27:55 2008 New Revision: 133249 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133249 Log: 2008-03-15 Richard Guenther <[EMAIL PROTECTED]> PR

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-14 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-03-14 22:44 --- I'll have a look. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedT

[Bug middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-14 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2008-03-14 22:44 --- Because we fold the pointer addition to &a->d[-8] ;) -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/35593] New: spurious warning "array subscript is below array bounds" with void* function argument plus -O2

2008-03-14 Thread niemayer at isg dot de
-O2 is: /tmp/test.cxx: In function ‘void test(B*)’: /tmp/test.cxx:22: warning: array subscript is below array bounds /tmp/test.cxx: In function ‘void test(A*)’: /tmp/test.cxx:10: warning: array subscript is below array bounds I have not found a sane way in my non-example, real-world code to avoid t