Commit 0e183333 by Jason Merrill Committed by Jason Merrill

re PR c++/37806 (CV-qualifiers on function typedef's are inconsistently accepted…

re PR c++/37806 (CV-qualifiers on function typedef's are inconsistently accepted depending on typedef scope)

        PR c++/37806
        * g++.dg/template/typedef17.C: New test.

From-SVN: r145366
parent 0d9c0892
2009-03-31 Jason Merrill <jason@redhat.com>
PR c++/37806
* g++.dg/template/typedef17.C: New test.
* g++.dg/cpp0x/auto6.C: Adjust expected mangling.
* g++.dg/cpp0x/auto12.C: Likewise.
......
// PR c++/37806
extern "C" int printf (const char *, ...);
template <typename T>
struct S1
{
typedef void (function_type)(int) const;
};
struct S2: public S1<int>
{
virtual function_type f = 0;
};
struct S3: public S2
{
void
f (int i) const
{
printf ("Hello world: %d\n", i);
}
};
int
main()
{
S3 s;
s.f(5);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment