Problem with gcc 4.0.1
Ernest L. Williams Jr.
ernesto@ornl.gov
Wed Sep 21 02:21:00 GMT 2005
Hi,
The following code fragment is now causing problems under gcc 4.0.1
Everything is perfect under "gcc version 3.4.3"
Any recommended work-arounds?
================= code fragment======================================
#ifndef __LOC_PV_FACTORY_H__
#define __LOC_PV_FACTORY_H__
line 10 --> #include "pv_factory.h"
line 11 -->
line 12 --> class LOC_PV_Factory : public PV_Factory
line 13 --> {
line 14 --> public:
line 15 --> LOC_PV_Factory();
line 16 --> ~LOC_PV_Factory();
line 17 --> ProcessVariable *create(const char *PV_name);
line 18 --> private:
line 19 --> friend class LOC_ProcessVariable;
line 20 --> static void forget(LOC_ProcessVariable *pv);
line 21 --> };
=====================================================================
Here is the error and it only happens under gcc 4.0.1:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-I/usr/X11R6/include/X11 ../loc_pv_factory.cc
../loc_pv_factory.h:20: error: âLOC_ProcessVariableâ has not been
declared
../loc_pv_factory.cc:118: error: prototype for âvoid
LOC_PV_Factory::forget(LOC_ProcessVariable*)â does not match any in
class âLOC_PV_Factoryâ
../loc_pv_factory.h:20: error: candidate is: static void
LOC_PV_Factory::forget(int*)
../loc_pv_factory.cc: In destructor âvirtual
LOC_ProcessVariable::~LOC_ProcessVariable()â:
../loc_pv_factory.cc:257: error: cannot call member function âvoid
LOC_PV_Factory::forget(LOC_ProcessVariable*)â without object
make[1]: *** [loc_pv_factory.o] Error 1
make[1]: Leaving directory
`/ade/epics/supTop/extensions/src/edm/lib/O.linux-x86'
make: *** [install.linux-x86] Error 2
[williams@matrix lib]$
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thanks,
Ernesto
More information about the Gcc
mailing list