[LTP] Question about strncpy_2-1

Xiao Yang yangx.jy@cn.fujitsu.com
Tue Dec 11 10:59:47 CET 2018


On 2018/12/11 17:30, Xiao Yang wrote:
> Hi all,
>
> With old gcc version(e.g. gcc-4.4), compiling strncpy_2-1 gets the following error:
> ----------------------------------------------------------------------------------
> ../../../conformance/interfaces/strncpy/1-1.c: In function ‘main’:
> ../../../conformance/interfaces/strncpy/1-1.c:64: error: #pragma GCC diagnostic not allowed inside functions
> ../../../conformance/interfaces/strncpy/1-1.c:65: error: #pragma GCC diagnostic not allowed inside functions
> ../../../conformance/interfaces/strncpy/1-1.c:67: error: #pragma GCC diagnostic not allowed inside functions
> conformance/interfaces/strncpy/1-1 compile FAILED; SKIPPING
> ----------------------------------------------------------------------------------
>
> It seems that push/pop is supported and pragma diagnostic is allowed inside functions
> since commit 0955be6 in GCC.
>
> It is clear for me to know tha fact that current gcc version doesn't support above pragma
> diagnostic code, so anyone can tell me if we should keep the error?
Hi all,

In addition, this compiler error doesn't break the whole openposix compilation.

Best Regards,
Xiao Yang

> Best Regards,
> Xiao Yang
>
>
>
>





More information about the ltp mailing list