From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 36E333858296; Wed, 30 Aug 2023 12:39:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36E333858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693399158; bh=BybcSkSRi1tqzNuKPgNVJqvK12SD8EclYvMbDwOoVkY=; h=From:To:Subject:Date:From; b=CqPifmH4wYtm5H6TF/0pJ2phGwgSEbgBZ6AtvgEGof4TIp4AKYtwYde+x9yGKdoG4 zly8n5hilfwThqu9fc2jbiw3wqujkzFFw9Ze8+iuiTmth38t6304AA8bwP2n79mWcN MyBoQQCIyb/UOfJH1LBMq5DAuGF/wIo1e9CWIhHI= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Handle pragma GCC optimize for clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 948cce6cf63c2aa3182f3e6018724ac3c0229fe7 X-Git-Newrev: b79c067f2e259eaf431a306eab945087d029226d Message-Id: <20230830123918.36E333858296@sourceware.org> Date: Wed, 30 Aug 2023 12:39:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b79c067f2e259eaf431a306eab945087d029226d commit b79c067f2e259eaf431a306eab945087d029226d Author: Adhemerval Zanella Date: Thu Mar 24 16:17:59 2022 -0300 Handle pragma GCC optimize for clang Diff: --- libio/tst-bz24051.c | 6 +++++- libio/tst-bz24153.c | 6 +++++- malloc/tst-tcfree3.c | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libio/tst-bz24051.c b/libio/tst-bz24051.c index b2610827a0..a9053c0dca 100644 --- a/libio/tst-bz24051.c +++ b/libio/tst-bz24051.c @@ -19,7 +19,11 @@ /* Prevent putchar -> _IO_putc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include diff --git a/libio/tst-bz24153.c b/libio/tst-bz24153.c index 88f7ab13eb..37e0a250bd 100644 --- a/libio/tst-bz24153.c +++ b/libio/tst-bz24153.c @@ -18,7 +18,11 @@ /* Prevent getchar -> getc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize ("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include diff --git a/malloc/tst-tcfree3.c b/malloc/tst-tcfree3.c index ce6d958f8a..dbee260322 100644 --- a/malloc/tst-tcfree3.c +++ b/malloc/tst-tcfree3.c @@ -20,7 +20,11 @@ #include /* Prevent GCC from optimizing away any malloc/free pairs. */ -#pragma GCC optimize ("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif static int do_test (void)