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

            Bug ID: 115310
           Summary: Option -Werror=return-type is too aggressive with
                    -std=gnu89
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Consider:

 echo 'main () { return 0; }' > t.c

and then

  gcc -S -Werror=return-type t.c

works but

  gcc -S -Werror=return-type -std=gnu89 t.c

causes an error.

This reduces the ability to use -std=gnu89 to avoid new errors which
used to be warnings in environments where -Werror=return-type is the
default.

Reply via email to