bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Revision 1155: array subscript is below array bounds


From: Dr . Jürgen Sauermann
Subject: Re: [Bug-apl] Revision 1155: array subscript is below array bounds
Date: Mon, 27 May 2019 13:18:36 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Jerome,

after checking the code several times, I believe the warning is bogus.
However, I changed the axis argument from signed to unsigned, which
should silence your compiler (unless it finds a way to construct a negative
unsigned integer).

*SVN 1158*.

Best Regards,
Jürgen Sauermann



On 5/26/19 9:15 PM, Jerome Ibanes wrote:
> Revision 1157:
>
> g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror     -rdynamic -g
> -O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
> .deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
> 'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
> In file included from PrintBuffer.hh:28:0,
>                  from Cell.hh:30,
>                  from CharCell.hh:24,
>                  from Value.hh:24,
>                  from ArrayIterator.hh:25,
>                  from PrimitiveFunction.cc:24:
> Shape.hh: In static member function ‘static Value_P
> Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
>     { Assert(r < rho_rho);   return rho[r]; }
>                                          ^
> Shape.hh: In static member function ‘static Value_P
> Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
>     { Assert(r < rho_rho);   return rho[r]; }
>                                          ^
> Shape.hh: In static member function ‘static Token
> Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
>     { Assert(r < rho_rho);   return rho[r]; }
>                                          ^
> Shape.hh:109:41: error: array subscript is below array bounds
> [-Werror=array-bounds]
>     { Assert(r < rho_rho);   return rho[r]; }
>                                          ^
> cc1plus: all warnings being treated as errors
> Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed
>
> On Sun, May 26, 2019 at 12:08 PM Dr. Jürgen Sauermann
> <address@hidden> wrote:
>> Hi Jerome,
>>
>> I may have found the fault, please check SVN 1157.
>>
>> Thanks,
>> Jürgen
>>
>>
>> On 5/26/19 12:40 AM, Jerome Ibanes wrote:
>>
>> Revision 1156.
>>
>> g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror     -rdynamic -g
>> -O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
>> .deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
>> 'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
>> In file included from PrintBuffer.hh:28:0,
>>                  from Cell.hh:30,
>>                  from CharCell.hh:24,
>>                  from Value.hh:24,
>>                  from ArrayIterator.hh:25,
>>                  from PrimitiveFunction.cc:24:
>> Shape.hh: In static member function ‘static Value_P
>> Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh: In static member function ‘static Value_P
>> Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh: In static member function ‘static Token
>> Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> cc1plus: all warnings being treated as errors
>> Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed
>> make[3]: *** [apl-PrimitiveFunction.o] Error 1
>>
>> On Sat, May 25, 2019 at 10:52 AM Dr. Jürgen Sauermann
>> <address@hidden> wrote:
>>
>> Hi Jerome,
>>
>> I could not find anything wrong; the warning may or may not be bogus.
>>
>> I nevertheless made a change to narrow down the problem and to make the
>> array subscript more explicit. Unfortunately the warnings below do not 
>> provide
>> sufficient information as to where exactly the problem was detected by the 
>> compiler.
>>
>> Please let me know if the warning occurs also in SVN 1156.
>>
>> Thanks,
>> Jürgen
>>
>>
>>
>>
>> On 5/25/19 5:33 AM, Jerome Ibanes wrote:
>>
>> Linux x86_64, Debian 8, g++ 4.9.2-10+deb8u1.
>> GNU APL Revision 1155.
>>
>> [...]
>> g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror     -rdynamic -g
>> -O2 -MT apl-PrimitiveFunction.o -MD -MP -MF
>> .deps/apl-PrimitiveFunction.Tpo -c -o apl-PrimitiveFunction.o `test -f
>> 'PrimitiveFunction.cc' || echo './'`PrimitiveFunction.cc
>> In file included from PrintBuffer.hh:28:0,
>>                  from Cell.hh:30,
>>                  from CharCell.hh:24,
>>                  from Value.hh:24,
>>                  from ArrayIterator.hh:25,
>>                  from PrimitiveFunction.cc:24:
>> Shape.hh: In static member function ‘static Value_P
>> Bif_COMMA::prepend_scalar(const Cell&, Axis, Value_P)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh: In static member function ‘static Value_P
>> Bif_COMMA::append_scalar(Value_P, Axis, const Cell&)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh: In static member function ‘static Token
>> Bif_COMMA::catenate(Value_P, Axis, Value_P)’:
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> Shape.hh:109:41: error: array subscript is below array bounds
>> [-Werror=array-bounds]
>>     { Assert(r < rho_rho);   return rho[r]; }
>>                                          ^
>> cc1plus: all warnings being treated as errors
>> Makefile:2664: recipe for target 'apl-PrimitiveFunction.o' failed
>>
>> Thank you.
>>
>>
>>
>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]