bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: fixes for Clang builtins when compiling Emacs on Fedora
Date: Mon, 17 Aug 2020 18:10:09 -0700	[thread overview]
Message-ID: <a594689a-a43b-339e-ab42-3ff41ad6f3bf@cs.ucla.edu> (raw)
In-Reply-To: <2538007.71trb2julv@omega>

On 8/17/20 4:37 PM, Bruno Haible wrote:
>> +   Avoid Clang’s __builtin_assume, as clang 9.0.1 -Wassume can
>> +   generate a bogus diagnostic "the argument to '__builtin_assume' has
>> +   side effects that will be discarded" even when the argument has no
>> +   side effects.  */
> Do you have a test case, that we could check on clang 10 and on future
> clang versions?

Here's a short test that elicits the bogus warning for me now.

static int f (int x) { return x; }
int main (void) { __builtin_assume (f (1)); return 0; }


  reply	other threads:[~2020-08-18  1:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 22:02 fixes for Clang builtins when compiling Emacs on Fedora Paul Eggert
2020-08-17 23:37 ` Bruno Haible
2020-08-18  1:10   ` Paul Eggert [this message]
2020-08-22 10:30     ` Clang __built_assume Bruno Haible
2020-08-22 17:32       ` Paul Eggert
2020-08-22 23:01         ` Clang __builtin_assume Bruno Haible
2020-08-23 13:46 ` clang's __diagnose_if__ and glibc fortify Bruno Haible

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=a594689a-a43b-339e-ab42-3ff41ad6f3bf@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.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).