1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// PR c++/47634
// { dg-do compile }
class Base {
public:
Base() { }
};
class VDerived : public virtual Base {
public:
VDerived(int x, const char * f, ...) __attribute__((format(printf, 3, 4)));
};
class Derived : public Base {
public:
Derived(int x, const char * f, ...) __attribute__((format(printf, 3, 4)));
};
VDerived::VDerived(int, const char *, ...)
{
}
Derived::Derived(int, const char *, ...)
{
}
int
main(int, char **)
{
throw VDerived(1, "%s %d", "foo", 1);
throw Derived(1, "%s %d", "bar", 1);
}
|