> 2) The signed/unsigned unions in osiWireFormat.h to avoid overzealous
> aliasing optimizations are not necessary since the the strict
> aliasing rules say that types which differ only in signed-ness can
> not be assumed to be non-overlapping.
>
If this is true then it wouldn't be difficult to special case the situation
for same sized integers which differ only in sign in osiWireFormat.h.
However, there would be more source code to maintain, and there might be
minimal real world gains realized because, for modern compilers at least,
the optimizer probably is already doing this same optimization behind the
scenes, and just eliminating the copy through the temporary union.
Considering that it won't make the source code that much larger, I am
willing to implement this optimization (it should require a change only to
osiWireFormat.h). It is important to know for certain that this isn't going
to cause problems with a standards compliant compiler. Could you point me to
a reference on the web documenting the gory details?
Thanks,
Jeff
- References:
- osiWireFormat.h problems Eric Norum
- Navigate by Date:
- Prev:
RE: osiWireFormat.h problems Jeff Hill
- Next:
Re: osiWireFormat.h problems Eric Norum
- Index:
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: osiWireFormat.h problems Eric Norum
- Next:
Re: osiWireFormat.h problems Ralph Lange
- Index:
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|