From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 1ABF63883029; Thu, 28 Sep 2023 17:54:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1ABF63883029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695923696; bh=nzgT5+ATpJULNhIn+0ba7q6wEIUFflt4gYVdfP6XH6w=; h=From:To:Subject:Date:From; b=ui5WJFJpSnnZupyfTUfKgCcEBCGGy+Tjbz6NpNiDspicqlwr/5GmERtUtRs7i7pIz zrYMqnR8XJZkpoZ7FEI3s/0g9m/oo2cvla9NxAblejXWqB8D2aGMWU+a/Wd61QViuV bCK1NyUkjBjB8e3ANOlavrmSh74ZyjjN/TyxADRw= 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: 09c3225001d42e2cdd63207cafa92e22756d502b X-Git-Newrev: 4da53696a28ec5e8c931124316991e644040472e Message-Id: <20230928175456.1ABF63883029@sourceware.org> Date: Thu, 28 Sep 2023 17:54:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4da53696a28ec5e8c931124316991e644040472e commit 4da53696a28ec5e8c931124316991e644040472e 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)