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

            Bug ID: 108295
           Summary: Free label positions shouldn't be available outside
                    -std=c2x
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel.lundin.mail at gmail dot com
  Target Milestone: ---

The new C23 features introduced in gcc 11.0.0 appears to be inconsistently
deactivated when picking some other version than -std=c2x.

The new C23 feature "Free positioning of labels inside compound statements"
appears to be active even with -std=c17 or the default gnu17 is picked. Unlike
other C23 features introduced in the same version 11 release, which are
correctly activated when using -std=c2x or otherwise inactivated.

For example gcc treats true/false as bool when activating -std=c2x but treats
them as int when older C versions are used. Free positioning of labels should
behave just in the same manner.

See attached example.

Reply via email to