EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Soft motor won't compile with GNU g++ 3.4 and beyond
From: "Ronald L. Sluiter" <[email protected]>
To: "Denison, PN (Peter)" <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Thu, 13 Oct 2005 09:08:19 -0500
Peter,

The first "stanza" has been removed from the next motor record release; i.e., R5-7.
I don't recall which combination of compiler and/or EPICS base versions required the cast.


Ron


Denison, PN (Peter) wrote:


Extract from devSoft.cc (in motor/motorApp/SoftMotorSrc/)

void soft_motor_callback(CALLBACK *cbptr)
{
#ifdef __GNUG__
   struct motorRecord *mr;

   callbackGetUser((void *) mr, cbptr);
   soft_process(mr);

#else
   void *mr;

   callbackGetUser(mr, cbptr);
   soft_process((motorRecord *) mr);
#endif
}

Compiling this on g++ 3.4.3 results in:
../devSoft.cc: In function `void soft_motor_callback(CALLBACK*)':
../devSoft.cc:297: error: ISO C++ forbids cast to non-reference type
used as lvalue

But removing the whole chunk inside the #ifdef does compile, on g++
3.4.3
Either chunk compiles on g++ 3.2.2

Does anyone know which versions of the GNU C++ compiler actually
required the first stanza? Can it be removed completely, since all
newish g++ versions work with the second stanza?

Peter Denison, Senior Software Engineer
Diamond Light Source Ltd., Diamond House, Chilton, Didcot, Oxon, OX11
0DE
Tel: +44 1235 778511





References:
Soft motor won't compile with GNU g++ 3.4 and beyond Denison, PN (Peter)

Navigate by Date:
Prev: Re: Accessing ControlLogix PLC program tags with EtherIP Kay-Uwe Kasemir
Next: RE: readline on cygwin-x86 Correction Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Soft motor won't compile with GNU g++ 3.4 and beyond Denison, PN (Peter)
Next: RE: readline on cygwin-x86 Correction Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·