Hi,
The following code fragment is now causing problems under gcc 4.0.1 Basically, I have "gcc version 4.0.1 20050919 (Red Hat 4.0.1-14)" from rawhide.
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
On Tue, 2005-09-20 at 22:35 -0400, Ernest L. Williams Jr. wrote:
Hi,
The following code fragment is now causing problems under gcc 4.0.1 Basically, I have "gcc version 4.0.1 20050919 (Red Hat 4.0.1-14)" from rawhide.
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"
class LOC_ProcessVariable;
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 --> }; =====================================================================
On Tue, 2005-09-20 at 22:50 -0400, Ignacio Vazquez-Abrams wrote:
On Tue, 2005-09-20 at 22:35 -0400, Ernest L. Williams Jr. wrote:
Hi,
The following code fragment is now causing problems under gcc 4.0.1 Basically, I have "gcc version 4.0.1 20050919 (Red Hat 4.0.1-14)" from rawhide.
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"
class LOC_ProcessVariable;
Thanks. Awesome!!! I am back in business. :) By the way was that documented anywhere in the RELEASE_NOTES for GCC?
Well in recent times: I think the G++ is becoming more stable/standardized. I used have a lot more issues everytime the compiler changed.
Thanks again, Ernesto
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 --> }; =====================================================================
On Tue, 2005-09-20 at 23:14 -0400, Ernest L. Williams Jr. wrote:
On Tue, 2005-09-20 at 22:50 -0400, Ignacio Vazquez-Abrams wrote:
On Tue, 2005-09-20 at 22:35 -0400, Ernest L. Williams Jr. wrote:
Hi,
The following code fragment is now causing problems under gcc 4.0.1 Basically, I have "gcc version 4.0.1 20050919 (Red Hat 4.0.1-14)" from rawhide.
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"
class LOC_ProcessVariable;
Thanks. Awesome!!! I am back in business. :) By the way was that documented anywhere in the RELEASE_NOTES for GCC?
It's PR1016 on 2005-05-20 in the changelog.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1016
Well in recent times: I think the G++ is becoming more stable/standardized. I used have a lot more issues everytime the compiler changed.
I believe that it's GCC's eventual goal to follow the C++ standard to the letter, and that it's doing an excellent job thus far.