Re: [LTP] [PATCH] config: Explicitly set gnu99

Richard Palethorpe
2022-11-22T10:02:10Z

Hello,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Richie, Cyril,
>
> ...
>> >> > I woder if this would work with different compilers. I suppose clang
>> >> > does work, but what about icc?
>
>> >> Clang is fine. I doubt that icc compiles LTP at present unless it does
>> >> support GNU extensions.
>
>> > Fair enough.
>
>> >> > I supose that we get tons of 'can't do pointer arithmetics on void*
>> >> > pointers and stuff' with plain c99. Maybe it would be better to clean
>> >> > these out instead.
>
> FYI gnu99 works on our CI
> https://github.com/pevik/ltp/actions/runs/3521626082
>
> and c99 not
> https://github.com/pevik/ltp/actions/runs/3521624383
> parse_opts.c:458:35: error: implicit declaration of function 'sbrk' [-Werror=implicit-function-declaration]
> parse_opts.c:475:27: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
> parse_opts.c:208:47: error: 'optarg' undeclared (first use in this function)
> and many other errors
>
> Richie probably found that himself.
>
> So that I'm for merging this and Jan's fixes on the top of it.
> I suppose there is no feature dependency on autotools (i.e. we don't need to add
> -std=gnu99 to any of macros in m4/.

Yes, agreed. Just see my comment on the other thread first. Thanks.

>
> Kind regards,
> Petr

--
Thank you,
Richard.