Re: An aliasing problem

Bruno Haible <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <1488245841.0kAqM59hzD@omega>
Pascal,

> >> 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.

I'm not so pessimistic. I guess it's possible to write a test that checks
1, 2, or 3 typical optimizations a compiler would do based on type-based
aliasing analysis.

Bruno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.