Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / pr117825.C
blob077e09d9a57b823b89ff67f64801a9a6a14fbbfb
1 // PR c++/117825
2 // { dg-do compile { target c++17 } }
3 // { dg-options "-Wformat -Wformat-security" }
5 __attribute__((format (printf, 1, 2)))
6 int fails (const char *, ...) { return 0; }
8 template <auto func, typename... Args>
9 auto wrap (Args... args) -> decltype (func (args...))
11   return func (args...);        // { dg-warning "format not a string literal and no format arguments" }
14 int
15 main ()
17   wrap<fails> ("Test!");