From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 735C73858D20; Wed, 17 Apr 2024 20:10:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 735C73858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713384611; bh=QvIcPRRSrW2DxO0s4Oll/PWY8eGfGCQQwuaZUAOuKNY=; h=From:To:Subject:Date:From; b=b2aVHVI7IiBdHhk4A7mkV7WiwVqEBKpENB/qH7TMSJrPYOLppIQPIDVvmvS0TFNYk Wf2w66h25dd+BP8crluxL6KcvXVtQlX7Z4HNQQ2fDFNjYZeXnZPzfk3CLs5ttc7OmP kDDFqZR9PbGCWBTTzKI+VQSpz1GOtsQp3RJE63eI= 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: 6cd43d274dd9022db14f0b40804640e11e4db658 X-Git-Newrev: 8eb85e1f8ac6ec5544e681d3d1e880e442b37310 Message-Id: <20240417201011.735C73858D20@sourceware.org> Date: Wed, 17 Apr 2024 20:10:11 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8eb85e1f8ac6ec5544e681d3d1e880e442b37310 commit 8eb85e1f8ac6ec5544e681d3d1e880e442b37310 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 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libio/tst-bz24051.c b/libio/tst-bz24051.c index a9903f20a3..2d32aae74a 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 023f07ca20..c379876fcc 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