Experimental Physics and Industrial Control System
|
On 12/11/19 3:34 PM, Michael Davidsaver wrote:
since it modifies source files that get compiled with older C++ compilers on our supported platforms. The two previous commits were in the posix/epicsMath.h file which doesn't get compiled on those targets so arguably may use features that the general C++ sources can't.
Still, the fix will be the same. Copious #ifdef
The reason we have OS-specific versions of epicsMath.h is precisely to /avoid/ having to have copious workarounds and #ifdefs elsewhere — the ugly code should only have to appear in libCom. The epicsMath.h headers were originally created to declare epicsNAN and epicsINF, and to make finite(), isinf() and isnan() usable by any code that includes it.
Unfortunately, as is so often the case, OS_CLASS isn't the right granularity.
Even POSIX=YES doesn't help with code sharing between WIN32 and vxWorks,
which are the two target where the Dinkumware c++ library appears.
I agree that OS_CLASS is rarely sufficient to avoid all #ifdefs, but it can often reduce the number of #ifdefs needed, making it easier to read any remaining conditionals in the header file. It also means that someone fixing and testing on one platform is less
likely to fiddle with and break something for another platform that they aren't explicitly testing.
Previously application or test code which wanted to detect inf/nan only had to
#include <epicsMath.h> and the header took care of declaring finite(),
isinf() and isnan() for it to use, however that had to happen for the platform and compiler involved. Ralph's commit added
using std::isnan; to C++ files that already have #include "epicsMath.h" which seems duplicative to me.
I'm all in favour of deprecating and then getting rid of libCom header files that we don't need once all our platform compilers support a common standard API, but we aren't there yet with std::isnan() and std::isinf() so I think it makes more sense to continue
to use epicsMath.h for now.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
|
- References:
- Build failed in Jenkins: epics-base-3.15-vx69 #411 APS Jenkins via Core-talk
- Builds failing in Jenkins Johnson, Andrew N. via Core-talk
- Re: Builds failing in Jenkins Michael Davidsaver via Core-talk
- Re: Builds failing in Jenkins Johnson, Andrew N. via Core-talk
- Re: Builds failing in Jenkins Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Re: Builds failing in Jenkins Michael Davidsaver via Core-talk
- Next:
Jenkins build is back to normal : epics-base-3.15-vx55 #415 APS Jenkins via Core-talk
- 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: Builds failing in Jenkins Michael Davidsaver via Core-talk
- Next:
Jenkins build is back to normal : epics-base-3.15-vx69 #412 APS Jenkins via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|
ANJ, 16 Dec 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|