From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id E1CE43858297; Wed, 7 Feb 2024 14:09:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1CE43858297 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314998; bh=FQVplHYiFa6EllDX+CR8JXZbsF1ITHUTLsFBpuS6124=; h=From:To:Subject:Date:From; b=ZSOxWZoE4n0YPVgljG9WB/S5P7cWy6INSwgrGF9SMgEwDrBu97TIk6xOXqL34HcWc 4Txi2jDgVA9i+SzCWjYy5oV3cr8D49G61YZ3OwqGimXtsm8zuVbCVCZ+8IenRsFfz0 opy4QqdMp2ttlUJB7FdbKaA51lJVywvWal87XO/I= 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: cd5cdea43f2a932bfa366fcca593bc106d88c970 X-Git-Newrev: 179c3f1bfcb3a0647901ad5e9a663675549c5451 Message-Id: <20240207140958.E1CE43858297@sourceware.org> Date: Wed, 7 Feb 2024 14:09:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=179c3f1bfcb3a0647901ad5e9a663675549c5451 commit 179c3f1bfcb3a0647901ad5e9a663675549c5451 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