public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/107954] Support -std=c23/gnu23 as aliases of -std=c2x/gnu2x
Date: Mon, 06 Nov 2023 15:03:02 +0000	[thread overview]
Message-ID: <bug-107954-4-5XGdh2IMkQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107954-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joseph Myers <jsm28@gcc.gnu.org>:

https://gcc.gnu.org/g:fad61bf73b3158157a136bf4d9373fc3d9afe319

commit r14-5160-gfad61bf73b3158157a136bf4d9373fc3d9afe319
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Nov 6 15:01:22 2023 +0000

    c: Add -std=c23, -std=gnu23, -Wc11-c23-compat options [PR107954]

    At the June WG14 meeting, WG14 decided it preferred to keep C23 as the
    informal name for the next revision of the C standard, despite
    publication not being before 2024 (publication is due in 2024 whether
    or not technical changes at the January meeting result in an FDIS
    ballot being needed).  At the Cauldron I raised the question of
    whether we should thus now add option names such as -std=c23 to GCC,
    and there was support for doing so.

    Add -std=c23, making -std=c2x a deprecated alias; also add the alias
    -std=iso9899:2024.  Likewise, add -std=gnu23, making -std=gnu2x a
    deprecated alias, and add -Wc11-c23-compat, making -Wc11-c2x-compat a
    deprecated alias.

    Here, I'm generally just adding the new options and making the minimum
    changes required to do so, with documentation changed to refer to C23
    instead of C2X only where directly associated with documentation of
    these options.  It's intended that future changes will update
    documentation, diagnostics, comments, variable names, testcase names,
    etc. to refer consistently to C23.  When such changes are made, the
    new tests c23-opts-3.c, c23-opts-5.c and gnu23-opts-2.c are intended
    to keep using the old option names they are specifically testing,
    while other tests would start using the c23/gnu23 versions of the
    names (as well as the tests themselves being renamed).

    Updating option names is independent of updating to the final
    __STDC_VERSION__ value.  There, the question is whether we should
    update the value now or wait for the remaining significant features to
    be implemented first.  (I intend to review Martin's tag compatibility
    patches for GCC 14.  I'm not aware of anyone working on #embed - or on
    the [[unsequenced]] and [[reproducible]] attributes, though support
    for standard attributes is optional.)

    Bootstrapped with no regressions for x86_64-pc-linux-gnu.

            PR c/107954

    gcc/
            * doc/cpp.texi (__STDC_VERSION__): Refer to -std=c23 and
            -std=gnu23 instead of -std=c2x and -std=gnu2x.
            * doc/extend.texi (Attribute Syntax): Refer to C23 and -std=c23
            instead of C2x and -std=c2x.
            * doc/invoke.texi (-Wc11-c23-compat, -std=c23, -std=gnu23)
            (-std=iso9899:2024): Document, with -Wc11-c2x-compat, -std=c2x and
            -std=gnu2x as deprecated aliases.  Update descriptions of C23.
            * doc/standards.texi (Standards): Describe C23 with C2X as an old
            name.

    gcc/c-family/
            * c.opt (Wc11-c2x-compat): Rename to Wc11-c23-compat and make into
            a deprecated alias of Wc11-c23-compat.
            (std=c2x): Rename to std=c23 and make into a deprecated alias of
            std=c23.
            (std=gnu2x): Rename to std=gnu23 and make into a deprecated alias
            of std=gnu23.
            (std=iso9899:2024): New option.  Alias of std=c23.
            * c-lex.cc (interpret_float): Use OPT_Wc11_c23_compat instead of
            OPT_Wc11_c2x_compat.
            * c-opts.cc (c_common_handle_option): Use OPT_std_c23 instead of
            OPT_std_c2x and OPT_std_gnu23 instead of OPT_std_gnu2x.

    gcc/c/
            * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
            OPT_Wc11_c2x_compat.
            * c-typeck.cc (build_conditional_expr, convert_for_assignment):
            Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.

    gcc/testsuite/
            * gcc.dg/c23-opts-1.c, gcc.dg/c23-opts-2.c, gcc.dg/c23-opts-3.c,
            gcc.dg/c23-opts-4.c, gcc.dg/c23-opts-5.c, gcc.dg/gnu23-opts-1.c,
            gcc.dg/gnu23-opts-2.c: New tests.

  parent reply	other threads:[~2023-11-06 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 19:25 [Bug driver/107954] New: " romain.geissler at amadeus dot com
2022-12-02 21:00 ` [Bug c/107954] " pinskia at gcc dot gnu.org
2022-12-03  8:38 ` lukaszcz18 at wp dot pl
2022-12-07  0:41 ` joseph at codesourcery dot com
2023-08-10 23:07 ` romain.geissler at amadeus dot com
2023-08-11 15:48 ` joseph at codesourcery dot com
2023-10-19 13:49 ` daniel.lundin.mail at gmail dot com
2023-11-06 15:03 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-08  0:25 ` jsm28 at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107954-4-5XGdh2IMkQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).