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: Soft motor won't compile with GNU g++ 3.4 and beyond
From: "Denison, PN \(Peter\)" <[email protected]>
To: "EPICS tech-talk" <[email protected]>
Date: Thu, 13 Oct 2005 12:42:32 +0100
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


Replies:
Re: Soft motor won't compile with GNU g++ 3.4 and beyond Ronald L. Sluiter

Navigate by Date:
Prev: readline on cygwin-x86 Mark Rivers
Next: Re: Accessing ControlLogix PLC program tags with EtherIP Kay-Uwe Kasemir
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: readline on cygwin-x86 Mark Rivers
Next: Re: Soft motor won't compile with GNU g++ 3.4 and beyond Ronald L. Sluiter
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 ·