https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79055
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-02-10 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- I agree that complaining about POSIX isn't very useful when targeting a POSIX environment but I'm not sure expecting -Wpedantic/-pedantic not to warn POSIX extensions to ISO C is in supported by the documented purpose of the options: Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used. I wonder if this could be somehow handled either by adding a new -std=posixXX option or extending the existing -std=gnuXX options to extend to some version of POSIX. I'll confirm this as a reasonable request. It seems that there would be other uses for a strict POSIX-conformance mode besides the %m scanf directive (e.g., GCC could warn on POSIX obsolescent/deprecated features).