build failure with DECCXX compiler

Bug #541351 reported by Jeff Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Wishlist
Jeff Hill

Bug Description

The DECCXX compiler found some issues in the ca client library with unexpected calls to this template in the comBuf class:

    template < class T >
    bool push ( const T & value );

Additional information:
Many thanks to Kazuro FURUKAWA for his help with this issue.

See also <a href="http://www-linac.kek.jp/epics/osf/">http://www-linac.kek.jp/epics/osf/</a>

Original Mantis Bug: mantis-322
    http://www.aps.anl.gov/epics/mantis/view_bug_page.php?f_id=322

Tags: ca 3.14
Revision history for this message
Jeff Hill (johill-lanl) wrote :

Fixed in R3.14.10 using this patch:

cvs diff -wb (in directory C:\hill\R3.14.dll_hell_fix\epics\base\src\ca\)
? Edit1.TXT
? RCa01512
? tst.cpp
Index: comBuf.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/comBuf.h,v
retrieving revision 1.29.2.6
diff -u -b -w -b -r1.29.2.6 comBuf.h
--- comBuf.h 28 Jul 2008 16:19:49 -0000 1.29.2.6
+++ comBuf.h 2 Oct 2008 15:31:52 -0000
@@ -116,6 +116,8 @@
     epicsUInt8 buf [ comBufSize ];
     void * operator new ( size_t size );
     void operator delete ( void * );
+ template < class T >
+ bool push ( const T * ); // disabled
 };

 inline void * comBuf::operator new ( size_t size,
Index: comQueSend.cpp
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/comQueSend.cpp,v
retrieving revision 1.36.2.3
diff -u -b -w -b -r1.36.2.3 comQueSend.cpp
--- comQueSend.cpp 4 Nov 2005 14:37:02 -0000 1.36.2.3
+++ comQueSend.cpp 2 Oct 2008 15:21:06 -0000
@@ -106,10 +106,7 @@

 void comQueSend::copy_dbr_string ( const void * pValue )
 {
- // this extra step is required by Borland BCC 5.5
- const dbr_string_t & str =
- * static_cast <const dbr_string_t *> ( pValue );
- this->push ( str );
+ this->push ( static_cast < const char * > ( pValue ), MAX_STRING_SIZE );
 }

 void comQueSend::copy_dbr_short ( const void * pValue )
@@ -186,7 +183,7 @@

 void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem )
 {
- this->push ( static_cast <const dbr_string_t *> ( pValue ), nElem );
+ this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );
 }

 void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )
Index: comQueSend.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/comQueSend.h,v
retrieving revision 1.21.2.3
diff -u -b -w -b -r1.21.2.3 comQueSend.h
--- comQueSend.h 11 Jan 2007 21:38:59 -0000 1.21.2.3
+++ comQueSend.h 2 Oct 2008 15:04:57 -0000
@@ -149,6 +149,9 @@
         this->pushComBuf ( *pComBuf );
     }

+ template < class T >
+ inline void push ( const T * ); // disabled
+
     comQueSend ( const comQueSend & );
     comQueSend & operator = ( const comQueSend & );
 };

Revision history for this message
Andrew Johnson (anj) wrote :

R3.14.10 released.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.