[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can Autoconf help with the transition to stricter compilation de
From: |
Michael Matz |
Subject: |
Re: How can Autoconf help with the transition to stricter compilation defaults? |
Date: |
Wed, 16 Nov 2022 15:01:40 +0000 (UTC) |
User-agent: |
Alpine 2.20 (LSU 67 2015-01-07) |
Hey,
On Wed, 16 Nov 2022, Alexander Monakov wrote:
> > The idea is so obvious that I'm probably missing something, why autoconf
> > can't use that idiom instead. But perhaps the (historic?) reasons why it
> > couldn't be used are gone now?
>
> Ironically, modern GCC and LLVM optimize '&foobar != 0' to '1' even at -O0,
> and thus no symbol reference remains in the resulting assembly.
Err, right, *head-->table*.
Playing with volatile should help:
char foobar(void);
char (* volatile ptr)(void);
int main(void) {
ptr = foobar;
return ptr != 0;
}
Ciao,
Michael.
- Re: How can Autoconf help with the transition to stricter compilation defaults?, (continued)
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Aaron Ballman, 2022/11/14
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Jonathan Wakely, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Paul Eggert, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Jonathan Wakely, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Paul Eggert, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Aaron Ballman, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Paul Eggert, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Ben Boeckel, 2022/11/15
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Michael Matz, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Alexander Monakov, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?,
Michael Matz <=
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Richard Biener, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Sam James, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Michael Matz, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Jonathan Wakely, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Michael Matz, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Jonathan Wakely, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Paul Eggert, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Jeffrey Walton, 2022/11/16
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Paul Eggert, 2022/11/17
- Re: How can Autoconf help with the transition to stricter compilation defaults?, Zack Weinberg, 2022/11/16