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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
https://gcc.gnu.org/g:cc67d95dc100706ea665e8cce581d59466aba62e

commit r15-5813-gcc67d95dc100706ea665e8cce581d59466aba62e
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Sat Nov 30 01:49:21 2024 +0100

    c++: Implement C++26 P3176R1 - The Oxford variadic comma

    While we are already in stage3, I wonder if implementing this small paper
    wouldn't be useful even for GCC 15, so that we have in the GCC world one
    extra year of deprecation of variadic ellipsis without preceding comma.

    The paper just deprecates something, I'd hope most of the C++ code in the
    wild when it uses variadic functions at all uses the comma before the
    ellipsis.

    2024-11-30  Jakub Jelinek  <ja...@redhat.com>

    gcc/c-family/
            * c.opt (Wdeprecated-variadic-comma-omission): New option.
            * c.opt.urls: Regenerate.
            * c-opts.cc (c_common_post_options): Default to
            -Wdeprecated-variadic-comma-omission for C++26 or -Wpedantic.
    gcc/cp/
            * parser.cc: Implement C++26 P3176R1 - The Oxford variadic comma.
            (cp_parser_parameter_declaration_clause): Emit
            -Wdeprecated-variadic-comma-omission warnings.
    gcc/
            * doc/invoke.texi (-Wdeprecated-variadic-comma-omission): Document.
    gcc/testsuite/
            * g++.dg/cpp26/variadic-comma1.C: New test.
            * g++.dg/cpp26/variadic-comma2.C: New test.
            * g++.dg/cpp26/variadic-comma3.C: New test.
            * g++.dg/cpp26/variadic-comma4.C: New test.
            * g++.dg/cpp26/variadic-comma5.C: New test.
            * g++.dg/cpp1z/fold10.C: Expect a warning for C++26.
            * g++.dg/ext/attrib33.C: Likewise.
            * g++.dg/cpp1y/lambda-generic-variadic19.C: Likewise.
            * g++.dg/cpp2a/lambda-generic10.C: Likewise.
            * g++.dg/cpp0x/lambda/lambda-const3.C: Likewise.
            * g++.dg/cpp0x/variadic164.C: Likewise.
            * g++.dg/cpp0x/variadic17.C: Likewise.
            * g++.dg/cpp0x/udlit-args-neg.C: Likewise.
            * g++.dg/cpp0x/variadic28.C: Likewise.
            * g++.dg/cpp0x/gen-attrs-33.C: Likewise.
            * g++.dg/cpp23/explicit-obj-diagnostics3.C: Likewise.
            * g++.old-deja/g++.law/operators15.C: Likewise.
            * g++.old-deja/g++.mike/p811.C: Likewise.
            * g++.old-deja/g++.mike/p12306.C (printf): Add , before ... .
            * g++.dg/analyzer/fd-bind-pr107783.C (bind): Likewise.
            * g++.dg/cpp0x/vt-65790.C (printf): Likewise.
    libstdc++-v3/
            * include/std/functional (_Bind_check_arity): Add , before ... .
            * include/bits/refwrap.h (_Mem_fn_traits, _Weak_result_type_impl):
            Likewise.
            * include/tr1/type_traits (is_function): Likewise.

Reply via email to