g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: RE: FW: [EPICS Base R3.14.x 0000204]: vxWorks soft reboot hang
From: "Jeff Hill" <johill@lanl.gov>
To: "'Andrew Johnson'" <anj@aps.anl.gov>
Cc: "'EPICS core-talk'" <core-talk@aps.anl.gov>
Date: Mon, 8 Jan 2007 17:19:19 -0700
> 
> Unfortunately you broke the build on Tornado 2.0.2, but not on Tornado
> 2.2.1 which does compile successfully.  This is the error:
> 

All of this started with the original problem we had with gcc 4.0 on certain
mac osx systems. My current idea is to ifdef the gcc 4.0 compiler as
follows. I have committed this patch after seeing that it compiles with ms
vc++, gnu gcc 3.2.3, and on T202.

What I can't do here is arrive at the correct gcc minor version as I don't
have any system with gcc 4.0 installed. I have this set to zero now, but
this is probably too low. I usually set this sort of ifdef to the latest
version that is known to have the bug. It's usually a good bet to assume
that compiler bugs will be fixed in the next release. It is even possible
that the 2nd (default) clause in the ifdef will unexpectedly compile with
gcc 4.0 in which case we can just get rid of the ifdef.

cvs diff -r R3-14-2_branch:yesterday -r R3-14-2_branch -u -wb -i --
osdWireFormat.h (in directory osi/os/default) 
Index: osdWireFormat.h
===================================================================
RCS file:
/net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/osi/os/default/osdWireFo
rmat.h,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -c -u -w -b -i -r1.1.2.5 -r1.1.2.6
cvs diff: conflicting specifications of output style
--- osdWireFormat.h	22 Dec 2006 19:43:04 -0000	1.1.2.5
+++ osdWireFormat.h	8 Jan 2007 23:59:56 -0000	1.1.2.6
@@ -118,12 +118,20 @@
     dst = tmp._f;
 }
 
+#if defined ( __GNUC__ ) && ( __GNUC__ == 4 && __GNUC_MINOR__ <= 0 )
 template <>
 inline void WireGet < epicsOldString > ( 
     const epicsUInt8 * pWireSrc, epicsOldString & dst )
 {
     memcpy ( dst, pWireSrc, sizeof ( dst ) );
 }
+#else
+inline void WireGet ( 
+    const epicsUInt8 * pWireSrc, epicsOldString & dst )
+{
+    memcpy ( dst, pWireSrc, sizeof ( dst ) );
+}
+#endif
 
 template <>
 inline void WireSet < epicsFloat64 > ( 
@@ -148,20 +156,20 @@
 #   endif
 }
 
-// workaround for problems in visual C++ 8.0
+#if defined ( __GNUC__ ) && ( __GNUC__ == 4 && __GNUC_MINOR__ <= 0 )
 template <>
-inline void WireSet < const epicsOldString > ( 
+inline void WireSet < epicsOldString > ( 
     const epicsOldString & src, epicsUInt8 * pWireDst )
 {
     memcpy ( pWireDst, src, sizeof ( src ) );
 }
-
-template <>
-inline void WireSet < epicsOldString > ( 
+#else
+inline void WireSet ( 
     const epicsOldString & src, epicsUInt8 * pWireDst )
 {
     memcpy ( pWireDst, src, sizeof ( src ) );
 }
+#endif
 
 template <>
 inline void AlignedWireGet < epicsUInt16 > (


Navigate by Date:
Prev: [no subject] Sahin, Hakan
Next: RE: Status Report Jeff Hill
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: [no subject] Sahin, Hakan
Next: RE: Status Report Jeff Hill
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·