Discussion:
gcc error: extra qualification 'X::' on member
(too old to reply)
Schüle Daniel
2006-06-08 21:21:53 UTC
Permalink
hello all,

I couldn't find better subject
in last 2 days I had 2 broken builds

I was compiling astyle http://astyle.sourceforge.net/
and boehm gc http://www.hpl.hp.com/personal/Hans_Boehm/gc/
from sources

and both make breaked with error
error: extra qualification 'X::' on member 'bar'
(X and bar my names)

after I edited both files make could end successfully
this example is a simple reproduction of this behaviour

cat broken.cpp
#include <iostream>

struct X {
void foo(){}
void X::bar(){} // this line
};

int main(){
return 0;
}


Since I am using newest gcc 4.1.1 I was wondering
whether the above code was accepted by previous
gcc versions (3.4 and earlier) and who is right?

Regards, Daniel
Mark P
2006-06-08 23:13:22 UTC
Permalink
Post by Schüle Daniel
this example is a simple reproduction of this behaviour
cat broken.cpp
#include <iostream>
struct X {
void foo(){}
void X::bar(){} // this line
};
int main(){
return 0;
}
Works for me with gcc 3.2.3.

-Mark
James Dennett
2006-06-09 02:24:24 UTC
Permalink
Post by Mark P
Post by Schüle Daniel
this example is a simple reproduction of this behaviour
cat broken.cpp
#include <iostream>
struct X {
void foo(){}
void X::bar(){} // this line
};
int main(){
return 0;
}
Works for me with gcc 3.2.3.
But it's not legal C++, so this bug has been fixed in later
g++ versions apparently.

-- James
Schüle Daniel
2006-06-09 18:25:01 UTC
Permalink
Post by James Dennett
Post by Mark P
Post by Schüle Daniel
this example is a simple reproduction of this behaviour
cat broken.cpp
#include <iostream>
struct X {
void foo(){}
void X::bar(){} // this line
};
int main(){
return 0;
}
Works for me with gcc 3.2.3.
But it's not legal C++, so this bug has been fixed in later
g++ versions apparently.
-- James
thx for clarification

Regards, Daniel

Loading...