EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: warnings about strict aliasing
From: Michael Davidsaver <[email protected]>
To: Dirk Zimoch <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 29 Nov 2017 13:51:35 -0600
On 11/29/2017 12:43 PM, Dirk Zimoch wrote:
> The file anyscalar.h generates many warnings of the form
> 
> /afs/psi.ch/group/8431/dirk/git/BASE/epics-base-master/include/pv/anyscalar.h:98: warning: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules

The construct used (std::aligned_storage) is well defined in c++11.

http://en.cppreference.com/w/cpp/types/aligned_storage

> I am a bit concerned about that because it may lead to wrong optimization. I think this should either be fixed or -fno-strict-aliasing should be added to the compiler flags for recent gccs (i.e. not old vxWorks :-) )

GCC >=4.8.4 (at latest) doesn't warn about this even with -std=c++98.  So if anything, this is only need for older compilers.

Replies:
Re: warnings about strict aliasing Dirk Zimoch
References:
warnings about strict aliasing Dirk Zimoch

Navigate by Date:
Prev: EPICS 7 vxWorks diff Dirk Zimoch
Next: Re: SIML type CA and PINI=YES issue Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: warnings about strict aliasing Dirk Zimoch
Next: Re: warnings about strict aliasing Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·