[Bug c/80942] -Woverlength-strings should no longer be implied by -Wpedantic

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 11 20:55:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80942

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The documentation explicitly says -Wpedantic includes some warnings about 
things outside of ISO C, beyond those that violate syntax rules or 
constraints.  (Sometimes this only applies in conjunction with other 
options, e.g. -Wformat -Wpedantic.)

Where long strings are acceptable I'd suggest -Wpedantic 
-Wno-overlength-strings (if that doesn't work, it's a bug).  Just as 
there's e.g. -Wpedantic -Wno-long-long if building in pedantic C90 mode 
but wanting to use long long (though in the long long case, diagnostics 
*are* required for C90).


More information about the Gcc-bugs mailing list