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

            Bug ID: 80942
           Summary: -Woverlength-strings should no longer be implied by
                    -Wpedantic
           Product: gcc
           Version: 6.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent-gcc at vinc17 dot net
  Target Milestone: ---

According to various messages in the following discussion:

  https://gcc.gnu.org/ml/gcc-help/2017-05/msg00208.html

the goal of -Wpedantic is not to check for strict ISO conformity and the
warnings implied by its use should not break some acceptable non-portable code
as allowed by the standard. In particular to avoid confusion, -Wpedantic should
no longer imply -Woverlength-strings.

Note also that -Woverlength-strings encourages to write unsafe code by
forbidding to use assert(expr) (or something equivalent) on potentially large
expressions (which may come from a succession of macro expansions, in
particular in C90 mode, where the implementation limit is ridiculously low)[*],
even though the program would be portable in practice.

[*] This happens in practice in the GNU MPFR code when full assertions are
enabled.

Reply via email to