This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testcase for fixed PR c++/8237: Review wanted!


Nathanael Nerode wrote:

I intend to apply this.

But I wanted to check with the list first. I think that this test case can probably be simplified to one which doesn't mess around with printf and
stdio.h. I would like help doing that, if it's considered a good idea.

What about (this is the common practice for such cases in the testsuite):

extern "C" int printf (const char *, ...);

class A {
public:
 A() { printf("Acon\n"); }
};

class B {
public:
 B(A a) { printf("BAcon\n"); }
 void form() { printf("Bform\n"); }
};

int main() {
  // This used to give a parse error.
  B(A()).form();
}

???

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]