Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / miss-format-7.C
blobac892dcec6dadb70f70313d51f85d372334dff76
1 // PR c++/90953 - ICE with -Wmissing-format-attribute.
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wmissing-format-attribute" }
5 namespace std {
6 union [[gnu::may_alias]] _Any_data{};
7 enum _Manager_operation { __get_type_info };
8 template <typename> class A;
9 class B {
10   typedef bool (*_Manager_type)(_Any_data, const _Any_data &,
11                                 _Manager_operation);
12 public:
13   _Any_data _M_functor;
14   _Manager_type _M_manager;
17 struct type_info { } t;
19 template <typename _Res, typename... _ArgTypes>
20 class A<_Res(_ArgTypes...)> : B {
21   const type_info &target_type() const noexcept;
23 template <typename _Res, typename... _ArgTypes>
24 const type_info &A<_Res(_ArgTypes...)>::target_type() const noexcept {
25   _Any_data __typeinfo_result;
26   _M_manager(__typeinfo_result, _M_functor, __get_type_info);
27   return t;
29 } // namespace std