+2016-10-04 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast int argument to
+ %lc directive to wint_t to silence -Wformat warnings on targets
+ where the latter is a distinct type such as long.
+
2016-10-04 Martin Sebor <msebor@redhat.com>
PR c++/77804
T (3, "%c%c", '1', '2');
/* Wide characters. */
- T (0, "%lc", 0); /* { dg-warning "nul past the end" } */
- T (1, "%lc", 0);
- T (1, "%lc%lc", 0, 0);
- T (2, "%lc", 0);
- T (2, "%lc%lc", 0, 0);
+ T (0, "%lc", (wint_t)0); /* { dg-warning "nul past the end" } */
+ T (1, "%lc", (wint_t)0);
+ T (1, "%lc%lc", (wint_t)0, (wint_t)0);
+ T (2, "%lc", (wint_t)0);
+ T (2, "%lc%lc", (wint_t)0, (wint_t)0);
/* The following could result in as few as no bytes and in as many as
MB_CUR_MAX, but since the MB_CUR_MAX value is a runtime property
T (3, "%c%c", '1', '2');
/* Wide characters. */
- T (0, "%lc", 0);
- T (1, "%lc", 0);
- T (2, "%lc", 0);
+ T (0, "%lc", (wint_t)0);
+ T (1, "%lc", (wint_t)0);
+ T (2, "%lc", (wint_t)0);
/* The following could result in as few as a single byte and in as many
as MB_CUR_MAX, but since the MB_CUR_MAX value is a runtime property