C
Cronus
Hi
the following code the g++ (g++ (GCC) 3.3.3 (Debian 20040422)) emits the
error message that pasting of :: and hello is no valid preprocessor token.
The g++ 2.95.3 accepts the code. I know that handling of the ##
preprocessing operator has changed.
How I have to change the macro definiton of A(P)?
NO changes at macro calling should be necessary!
Thanks in advance!
#define A(P) int P##hello(void) {return 1;}
class B {
public:
B() {
b = 1;
}
private:
int b;
int hello();
};
A(D40);
A(B:;
int main(void) {
}
the following code the g++ (g++ (GCC) 3.3.3 (Debian 20040422)) emits the
error message that pasting of :: and hello is no valid preprocessor token.
The g++ 2.95.3 accepts the code. I know that handling of the ##
preprocessing operator has changed.
How I have to change the macro definiton of A(P)?
NO changes at macro calling should be necessary!
Thanks in advance!
#define A(P) int P##hello(void) {return 1;}
class B {
public:
B() {
b = 1;
}
private:
int b;
int hello();
};
A(D40);
A(B:;
int main(void) {
}