From: Pascal B. <pj...@in...> - 2017-02-27 23:54:28
|
> On 28 Feb 2017, at 00:48, Bruno Haible <br...@cl...> wrote: > > Sam, > >> On a second thought, this appears like a clear case for an autoconf test: >> check whether the default compiler does strict aliasing optimizations >> and, if it does, try to disable them, and if we cannot disable them, >> fail configure. > > Yes. Excellent idea! Even with compilers that we have never heard of, this will > do the right thing: bark at high optimization levels, and be silent when not > optimizing. The thing with optimizations is that you don’t get to decide when the compiler will apply them. So, the actual test program you will have to compile while configuring, will be the actual program. Only so, you can be sure whether the compiler did the optimization. -- __Pascal J. Bourguignon__ |