[LTP] [PATCH] pthread_barrier_init: remove the restrict limit

Petr Vorel pvorel@suse.cz
Tue Oct 18 14:45:05 CEST 2022


Hi,

Acked-by: Petr Vorel <pvorel@suse.cz>

> Hello,

> Li Wang <liwang@redhat.com> writes:

> > The restrict keyword tells the compiler that a given pointer
> > does not alias any other pointer in the same context. But this
> > is only supported by C99.

> > To make older platforms compilinng LTP successful, we have to cancel
> > that limitation in function definition.

> > Fix error: https://github.com/linux-test-project/ltp/actions/runs/3263823142/jobs/5363481739

Fixes: f55cb14ca ("syscalls/nice05: Add testcase for nice() syscall")

...
> > Notes:
> >       I also considering adding "-std=gun99" for compiling the whole library,
> >       but not sure if this could bring a bigger potential impact on
> > LTP.

> It would be nice to at least use C99, but I guess we can wait a bit
> longer until centos7 is EOL.

Exactly.
Also LTP is used by others on embedded, which might still have old toolchain
(although C99 as the default is since gcc 5.x [1], I'm not sure if anybody
really uses gcc 4.9.x [2], we could ask on automated-testing ML after 2024-06 -
CentOS 7 EOL).

Kind regards,
Petr

[1] https://gcc.gnu.org/onlinedocs/gcc-5.5.0/gcc/Standards.html
[2] https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Standards.html



More information about the ltp mailing list