You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expected-warning{{format specifier 's' is incompatible with 'd'}} \
226
+
expected-warning{{format specifier 'd' is incompatible with 's'}} \
227
227
expected-note{{comparing with this specifier}}
228
228
voidtest_positional_incompatible(constchar*f);
229
229
230
230
voidcall_positional_incompatible(void) {
231
231
// expect the attribute was dropped and that there is no diagnostic here
232
232
test_positional_incompatible("%d %d %d %d %d");
233
-
}
233
+
}
234
+
235
+
voidtest_many_i(void) {
236
+
cvt_i("%1$d %1$i");
237
+
cvt_i("%1$d %1$s"); // expected-warning{{format specifier 's' is incompatible with 'i'}}
238
+
}
239
+
240
+
__attribute__((format_matches(printf, 1, "%*d %*d"))) // expected-note{{comparing with this specifier}}
241
+
voidaccept_modifiers(constchar*f);
242
+
243
+
voidtest_modifiers(void) {
244
+
accept_modifiers("%2$*1$d %4$*3$d");
245
+
accept_modifiers("%2$*3$d %4$*3$d"); // expected-warning{{format argument modifies specifier at position 2, but it should modify specifier at position 4}}
0 commit comments