Build fails with gcc 4 due to missing forward class declarartions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Medium
|
Jeff Hill |
Bug Description
When I try to compile base-3.14.7 with a gcc-4 compiler, I get error messages such as the following in the src/cas/generic directory:
../../.
../../.
By adding a forward declaration such as "class casPVI;" before the structure definition a am able to compile.
Additional information:
I am now using the following patch to build base.
--- START PATCH ---
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -108,6 +108,7 @@
pverAsyncC
class casPV;
+class casPVI;
class casCtx;
class casChannel;
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -27,6 +27,8 @@
#include "clientBufMemor
+class inBuf;
+
class inBufCtx {
friend class inBuf;
public:
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -31,6 +31,8 @@
# include "shareLib.h"
#endif
+class ioBlockedList;
+
class ioBlocked : public tsDLNode < ioBlocked > {
friend class ioBlockedList;
public:
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -26,6 +26,8 @@
#include "casdef.h"
#include "clientBufMemor
+class outBuf;
+
//
// outBufCtx
//
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -19,6 +19,10 @@
#include "casDGIOWakeup.h"
#include "casDGEvWakeup.h"
+class casDGReadReg;
+class casDGBCastReadReg;
+class casDGWriteReg;
+
class casDGIntfOS : public casDGIntfIO {
friend class casDGReadReg;
friend class casDGBCastReadReg;
diff -uNr base-3.
--- base-3.
+++ base-3.
@@ -22,6 +22,8 @@
#include "casIntfIO.h"
#include "casDGIntfOS.h"
+class casServerReg;
+
//
// casIntfOS
//
--- END PATCH ---
Original Mantis Bug: mantis-216
http://
I can confirm that this patch fixes the missing- forward- class-definitio ns problem.
host: x86-linux
gcc (GCC) 4.0.1 (Debian 4.0.1-2)
target: vxWorks-68040
gcc-2.96