On 11/26/18 10:27 AM, Joseph Myers wrote:
On Fri, 23 Nov 2018, Martin Sebor wrote:
I have now committed this patch as r266418.
This commit introduced spurious warnings that break the glibc testsuite
build.
bug-ungetwc2.c:62:17: error: '%ls' directive argument is not a nul-terminated
string [-Werror=format-overflow=]
62 | fprintf (fp, "%ls", write_wchars);
| ^~~ ~~~~~~~~~~~~
bug-ungetwc2.c:10:15: note: referenced argument declared here
10 | const wchar_t write_wchars[] = {L'A', 0x00C4, L'B', L'\0'};
| ^~~~~~~~~~~~
Reduced test (compile with -Wall, should not produce any warnings but
does after that commit):
const __WCHAR_TYPE__ s[] = { L'A', L'\0' };
void f (void) { __builtin_printf ("%ls", s); }
Thanks for the test case. I see the problem and I'm testing a simple
fix.
Martin