[SLOF] [PATCH] libc: The arguments of puts() can be marked as "const"

Thomas Huth thuth at redhat.com
Thu Jun 8 16:54:06 AEST 2017


On 08.06.2017 08:12, Alexey Kardashevskiy wrote:
[...]
> While you are fixing stuff like this, I started getting:
> 
> /home/aik/p/slof/slof/paflof.c: In function ‘engine’:
> /home/aik/p/slof/slof/paflof.c:84:23: warning: array subscript is below
> array bounds [-Warray-bounds]
>    dp = the_data_stack - 1;
>         ~~~~~~~~~~~~~~~^~~
> /home/aik/p/slof/slof/paflof.c:85:22: warning: array subscript is below
> array bounds [-Warray-bounds]
>    rp = handler_stack - 1;
>         ~~~~~~~~~~~~~~^~~
> 
> with gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) from Fedora24/BE.
> 
> Can you please take a look on this? Thanks.

See Segher's suggestions here:

 https://lists.ozlabs.org/pipermail/slof/2016-August/001221.html

IMHO we could also just simply sacrifice the first stack entry and only
use "dp = the_data_stack", without adding the inline asm here (to keep
paflof.c portable).

 Thomas


More information about the SLOF mailing list