Commit 3d6b9661 by Jason Merrill

new

From-SVN: r26559
parent 419c6212
// Test that attributes are really applied to function declarations under
// various conditions.
// Contributed by Jason Merrill (jason@cygnus.com)
// Special g++ Options: -Wformat
// Build don't link:
#define PF __attribute__ ((format (printf, 1, 2)))
struct A {
static PF void f (char *, ...);
friend PF void g (char *, ...);
static void test ();
};
void PF h (char *, ...);
void PF k (char *, ...) { }
void A::test ()
{
f ("%f", 42); // WARNING -
g ("%f", 42); // WARNING -
h ("%f", 42); // WARNING -
k ("%f", 42); // WARNING -
}
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