1 /* { dg-options "-fno-short-enums -Wno-return-type" } */
6 _sch_isxdigit = 0x0100,
10 _sch_isalnum = _sch_isidst | _sch_isdigit,
11 _sch_iscppsp = _sch_isvsp | _sch_isnvsp,
13 extern const unsigned short _sch_istable[256];
14 typedef union tree_node *tree;
15 typedef const union tree_node *const_tree;
18 OPT_Warray_bounds = 240,
20 OPT_Wintf_annotation = 368,
21 OPT_std_gnu__14 = 1311,
34 enum tree_node_structure_enum
39 enum integer_type_kind
46 enum tree_code code:16;
60 struct tree_type_common
66 struct tree_base base;
67 struct tree_typed typed;
68 struct tree_common common;
69 struct tree_type_common type_common;
70 struct tree_list list;
72 extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
73 extern tree integer_types[itk_none];
74 extern void tree_contains_struct_check_failed (const_tree,
75 tree_node_structure_enum,
78 __attribute__ ((__noreturn__));
80 tree_check (tree __t, const char *__f, int __l, const char *__g,
86 contains_struct_check (const_tree __t,
87 const enum tree_node_structure_enum __s,
88 const char *__f, int __l, const char *__g)
90 if (tree_contains_struct[((enum tree_code) (__t)->base.code)][__s] != 1)
91 tree_contains_struct_check_failed (__t, __s, __f, __l, __g);
95 tree_class_check (const_tree __t, const enum tree_code_class __class,
96 const char *__f, int __l, const char *__g)
101 is_attribute_p (const char *attr_name, const_tree ident)
105 extern int integer_zerop (const_tree);
106 extern bool warning (int, const char *, ...)
107 __attribute__ ((__nonnull__ (2)));
109 check_function_arguments_recurse (void (*)(void *, tree, unsigned long long),
110 void *, tree, unsigned long long);
111 extern bool objc_string_ref_type_p (tree);
114 FMT_FLAG_SCANF_A_KLUDGE = 2,
115 FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256
127 typedef struct alloc_pool_list_def
133 bool (*string_object_ref_type_p) (const_tree stringref);
136 extern struct gcc_targetcm targetcm;
139 gcc_objc_string_format_type,
141 typedef struct function_format_info
145 function_format_info;
146 static const format_kind_info format_types_orig[] = { };
147 struct format_check_context { };
149 static const format_kind_info *format_types = format_types_orig;
150 static void check_format_info (function_format_info *, tree);
151 void check_format_arg (void *, tree, unsigned long long);
154 check_function_format (tree attrs, int nargs, tree * argarray)
159 ((contains_struct_check
160 ((a), (TS_COMMON), "../../git-master/gcc/c-family/c-format.c", 1002,
161 __FUNCTION__))->common.chain))
166 ((a), "../../git-master/gcc/c-family/c-format.c", 1004,
167 __FUNCTION__, (TREE_LIST)))->list.purpose)))
169 function_format_info info;
171 tree params = (tree) __null;
172 check_format_info (&info, params);
179 avoid_dollar_number (const char *format)
181 while ((_sch_istable[(*format) & 0xff] & (unsigned short) (_sch_isdigit)))
185 warning (OPT_Wformat_,
186 "$ operand number used after format without operand number");
191 check_format_info (function_format_info * info, tree params)
193 format_check_context format_ctx;
194 unsigned long long arg_num;
196 check_function_arguments_recurse (check_format_arg, &format_ctx,
197 format_tree, arg_num);
198 const char *format_chars;
199 if (integer_zerop (format_tree))
202 ((contains_struct_check
203 ((params), (TS_COMMON),
204 "../../git-master/gcc/c-family/c-format.c", 1444,
205 __FUNCTION__))->common.chain);
209 if (((enum tree_code) (format_tree)->base.code) != ADDR_EXPR)
213 if (format_types[info->format_type].flags & (int)
214 FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL)
216 bool objc_str = (info->format_type == gcc_objc_string_format_type);
217 if (((enum tree_code) (format_tree)->base.code) != CONST_DECL
221 objc_string_ref_type_p (((contains_struct_check
222 ((format_tree), (TS_TYPED),
223 "../../git-master/gcc/c-family/c-format.c",
224 1498, __FUNCTION__))->typed.type)))
226 (*targetcm.string_object_ref_type_p) ((const_tree)
227 ((contains_struct_check
230 "../../git-master/gcc/c-family/c-format.c",
232 __FUNCTION__))->typed.
239 if (((tree_class_check
240 ((((contains_struct_check
241 ((((contains_struct_check
242 ((format_tree), (TS_TYPED),
243 "../../git-master/gcc/c-family/c-format.c", 1549,
244 __FUNCTION__))->typed.type)), (TS_TYPED),
245 "../../git-master/gcc/c-family/c-format.c", 1549,
246 __FUNCTION__))->typed.type)), (tcc_type),
247 "../../git-master/gcc/c-family/c-format.c", 1549,
248 __FUNCTION__))->type_common.main_variant) != integer_types[itk_char])
254 const format_kind_info *fki = &format_types[info->format_type];
255 while (*format_chars != 0)
258 if (fki->width_type != __null && *format_chars == '*')
261 if (avoid_dollar_number (format_chars))
262 if (avoid_dollar_number (format_chars))