bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixes for Clang builtins when compiling Emacs on Fedora


From: Paul Eggert
Subject: Re: fixes for Clang builtins when compiling Emacs on Fedora
Date: Mon, 17 Aug 2020 18:10:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]