From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Yang Date: Tue, 11 Dec 2018 17:30:20 +0800 Subject: [LTP] Question about strncpy_2-1 Message-ID: <5C0F83AC.8070902@cn.fujitsu.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: ltp@lists.linux.it 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? Best Regards, Xiao Yang