Re: An aliasing problem

Jason Miller <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
So we don't reinvent the wheel, John Regehr maintains a set of testcases
for how compilers optimize undefined behaviors here:

https://github.com/regehr/ub-canaries

In particular see:

https://github.com/regehr/ub-canaries/tree/master/strict-aliasing

On 00:54 Tue 28 Feb     , Pascal Bourguignon wrote:
>    On 28 Feb 2017, at 00:48, Bruno Haible <[1][email protected]> 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__
> 
> References
> 
>    1. mailto:[email protected]

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


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