Hello Paul,
Yes is true, "This has nothing to do with the attribute being protected
you get exact same error if it is made pulibc."
But, my hope is to install a software "Xvision" which was already
installed on different platforms working on several operating systems.
I have also a different package which works fine on VisualC++ but the
compilation fails on linux.
Can we consider this as a bug in gcc?
Presently, I am working in this environment:
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Thanks in advance,
Paul Pluzhnikov wrote:
Gelu Ionescu <[EMAIL PROTECTED]> writes:
When I try to use the protected attribute
This has nothing to do with the attribute being protected, you get
exact same error if it is made pulibc.
I am sure there is a flag in the gcc compiler which solves globally
this kind of situation.
There is no flag; your code is broken an must be fixed.
HP aCC issues the best diagnostics:
$ aCC -c t.cpp
Error (future) 641: "t.cpp", line 14 # Undeclared variable 'myT1'. A variable
with the same name exists in a template base class, but is not visible according to the
Standard lookup rules (See [temp.dep], 14.6.2(3) in the C++ Standard). You can make it
visible by writing 'this->myT1'.
{ t1* _t1 = myT1; // ERROR :'myT1' was not declared in this
scope
^^^^
Error (future) 641: "t.cpp", line 15 # Undeclared variable 'myT2'. A variable with the same name exists in a template base class, but is not visible according to the Standard lookup rules (See [temp.dep], 14.6.2(3) in the C++ Standard). You can make it
visible by writing 'this->myT2'.
t2* _t2 = myT2; // ERROR :'myT2' was not declared in this
scope
^^^^
Warning: 2 future errors were detected and ignored. Add a '+p' option to detect and fix them before they become fatal errors in a future release. Behavior of this ill-formed program is not guaranteed to match that of a well-formed program
Cheers,
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus