On Tue, Feb 21, 2012 at 09:57:23AM +0000, Hans Wennborg wrote: > On Mon, Feb 20, 2012 at 21:00, Ted Kremenek <[email protected]> wrote: > > On Feb 20, 2012, at 12:21 PM, Joerg Sonnenberger <[email protected]> > > wrote: > > > > There's "non-standard" and then there's completely unportable. Warnings > > like: > > > > + // Combining 'L' with an integer conversion specifier. > > + printf("%Li", (long long)42); // expected-warning{{using the length > > modifier 'L' with the conversion specifier 'i' is non-standard}} > > + printf("%Lo", (long long)42); // expected-warning{{using the length > > modifier 'L' with the conversion specifier 'o' is non-standard}} > > > > [...] > > > Do we really silently accept them? Until very recently (a month ago?), we > > emitted: > > > > t.c:4:12: warning: length modifier 'L' results in undefined behavior or no > > effect with 'i' conversion specifier [-Wformat] > > printf("%Li", (long long) 2); > > ~^~ > > 1 warning generated. > > > > > > Now I see that TOT doesn't warn here. Is this accepted somewhere? I see no > > test cases in clang/test that shows we should accept this. Was this an > > intentional change, or a regression? > > r148859 made them accepted about a month ago. Looks intentional to me :)
Which brings up the question, where is that documented? At least the Linux documentation is silent on this being valid. Joerg _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
