public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] Handle pragma GCC optimize for clang (fix)
Date: Thu, 12 May 2022 19:36:49 +0000 (GMT)	[thread overview]
Message-ID: <20220512193649.1ECD73888C58@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=21a41c304d78ab1d15d53daf0541d2a2e6352b10

commit 21a41c304d78ab1d15d53daf0541d2a2e6352b10
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 09:01:15 2022 -0300

    Handle pragma GCC optimize for clang (fix)

Diff:
---
 malloc/tst-tcfree3.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/malloc/tst-tcfree3.c b/malloc/tst-tcfree3.c
index 3a3149b3b2..215134a9ae 100644
--- a/malloc/tst-tcfree3.c
+++ b/malloc/tst-tcfree3.c
@@ -20,7 +20,11 @@
 #include <string.h>
 
 /* 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)


             reply	other threads:[~2022-05-12 19:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 19:36 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:23 Adhemerval Zanella
2022-06-09 13:19 Adhemerval Zanella
2022-06-03 14:09 Adhemerval Zanella
2022-05-13 14:23 Adhemerval Zanella
2022-05-10 18:27 Adhemerval Zanella
2022-04-29 14:07 Adhemerval Zanella
2022-04-04 12:57 Adhemerval Zanella
2022-03-31 19:09 Adhemerval Zanella
2022-03-29 20:33 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512193649.1ECD73888C58@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).