Re: An aliasing problem

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <m1o9xnz0az.fsf@clr-sds>
Hi Bruno,

> * Bruno Haible <[email protected]> [2017-02-27 22:36:07 +0100]:
>
>> diff -r 208ade5c97ca src/makemake.in
>> --- a/src/makemake.in	Sun Feb 26 20:07:47 2017 -0500
>> +++ b/src/makemake.in	Mon Feb 27 13:05:45 2017 -0500
>> @@ -1335,13 +1335,12 @@ fi
>>  # specific compiler options. I prefer to do it through compiler options.
>>  if [ $XCC_GCC = true ] ; then
>>    XCFLAGS=$XCFLAGS' -fno-strict-aliasing'
>> -else
>> -  if [ "$HSYSOS" = aix ] ; then # for xlc
>> +elif [ "$HSYSOS" = aix ] ; then # for xlc
>>      XCFLAGS=$XCFLAGS' -qalias=noansi'
>> -  fi
>> -  if [ -n "$XCC_SUNPRO" ] ; then # for SUNWspro cc
>> +elif [ -n "$XCC_SUNPRO" ] ; then # for SUNWspro cc
>>      XCFLAGS=$XCFLAGS' -xalias_level=weak'
>> -  fi
>> +elif [ "${with_debug}" != no ]; then
>> +  echo "$0: WARNING: how to disable strict aliasing with ${XCC} on ${HSYSOS}?" >&2
>>  fi
>>  
>>  if [ "${with_dynamic_modules}" != no ]; then # not on msvc
>
> The users of the configure script are most often our users, not ourselves,
> therefore such a warning it not very helpful.

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.


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net https://jihadwatch.org
http://www.dhimmitude.org http://www.memritv.org http://islamexposedonline.com
There are two ways to win an argument with a woman.  Neither works.

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