get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2197117/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2197117,
    "url": "http://patchwork.ozlabs.org/api/patches/2197117/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/aZQE4gN2LlTCIdoM@tucnak/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<aZQE4gN2LlTCIdoM@tucnak>",
    "list_archive_url": null,
    "date": "2026-02-17T06:04:18",
    "name": "c++: Don't support auto{x} and auto(x) for C++ < 23 in SFINAE contexts [PR120685]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3e2e0ab0f65b530b15c908a8f8f66173748ec338",
    "submitter": {
        "id": 671,
        "url": "http://patchwork.ozlabs.org/api/people/671/?format=api",
        "name": "Jakub Jelinek",
        "email": "jakub@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/aZQE4gN2LlTCIdoM@tucnak/mbox/",
    "series": [
        {
            "id": 492377,
            "url": "http://patchwork.ozlabs.org/api/series/492377/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492377",
            "date": "2026-02-17T06:04:18",
            "name": "c++: Don't support auto{x} and auto(x) for C++ < 23 in SFINAE contexts [PR120685]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492377/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2197117/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197117/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=bmthHuAd;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=bmthHuAd",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFTdV11m3z1xwD\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 17:05:18 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E3E504BAE7CA\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 06:05:15 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 4CE9F4BAE7C9\n for <gcc-patches@gcc.gnu.org>; Tue, 17 Feb 2026 06:04:31 +0000 (GMT)",
            "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-SZJ7U4LUOhyzbTzIT0yzjA-1; Tue,\n 17 Feb 2026 01:04:28 -0500",
            "from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id CCE87180AEF1\n for <gcc-patches@gcc.gnu.org>; Tue, 17 Feb 2026 06:04:23 +0000 (UTC)",
            "from tucnak.zalov.cz (unknown [10.45.224.10])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id BFDD319560B4; Tue, 17 Feb 2026 06:04:22 +0000 (UTC)",
            "from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 61H64IMI775187\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Tue, 17 Feb 2026 07:04:19 +0100",
            "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 61H64Iv1775184;\n Tue, 17 Feb 2026 07:04:18 +0100"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org E3E504BAE7CA",
            "OpenDKIM Filter v2.11.0 sourceware.org 4CE9F4BAE7C9"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 4CE9F4BAE7C9",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 4CE9F4BAE7C9",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771308271; cv=none;\n b=Y1OXa4L7jsc2PwJOICLxOgAgBgCO/Pu2eJdXFOrhfcAOx1v6tFOostgiBBM96hbGf/mg07vMe4hZgYLrxf4CYTXuUb+fzqdsaNDKHmDwxOL0Dqy8CJz4rQyAg409UxlD3tS7IaYt0otVxXtc6NdZCMDl1SGP2mioxCB+Su1dJ5c=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771308271; c=relaxed/simple;\n bh=vJjPwSmyb47IVu6ymJ1da/cQqpnZyGybCuJnA57Uso0=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=wu8dUPR1hgWclhsF9VrfIqWNC65FUIgWyql6DBkU6tMaIom4g1xVLZjQ+yHw8d/Hidd83acGU0GGlx910Q7VS82Fn8XHR/ec9edGrQwKsmibYPz7pvBNltAmneWWXrmbrnVsaY6cdNCRUfrBJoJ9KygIlVGWBlYNwvSHQbzhDyY=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771308270;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=f8utuJ0CURAPsNdT/xx+Twex0zzObGfZFUOK5dLPYAo=;\n b=bmthHuAdxdmyAm8pt1/lE9wNKZbM2aOdLVIIcVXvFffwd/5DLlFbLgLdaTQihYjFPCYnYT\n QViHcC0sOC08gF4Ro94x2S/b9mJOmmd6n1LBXVHo4Pg7aYvajIop32EYDAra4HJ/VxpBLM\n wfTts5Cb2EVnB0dOIfE3SmH7CQNpudM=",
        "X-MC-Unique": "SZJ7U4LUOhyzbTzIT0yzjA-1",
        "X-Mimecast-MFC-AGG-ID": "SZJ7U4LUOhyzbTzIT0yzjA_1771308264",
        "Date": "Tue, 17 Feb 2026 07:04:18 +0100",
        "From": "Jakub Jelinek <jakub@redhat.com>",
        "To": "Jason Merrill <jason@redhat.com>, Marek Polacek <polacek@redhat.com>",
        "Cc": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] c++: Don't support auto{x} and auto(x) for C++ < 23 in\n SFINAE contexts [PR120685]",
        "Message-ID": "<aZQE4gN2LlTCIdoM@tucnak>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.12",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "Jrds-gMERR_nkzbkNWkby25PYGhvoBAgrosCGd_EHN0_1771308264",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Reply-To": "Jakub Jelinek <jakub@redhat.com>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "Hi!\n\nThe following testcase ICEs in C++ 20 and older, because during\ndiagnostics dump_template_bindings attempts to tsubst with tf_none\nsomething and we try to emit a pedwarn during that.\nWhile the pedwarn could be just guarded with if (complain & tf_warning),\nI thought we shouldn't support extensions for tf_none and should\ninstead return error_mark_node.\n\nThe following patch does that.\nBootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?\n\n2026-02-17  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR c++/120685\n\t* typeck2.cc (build_functional_cast_1): For C++23 auto(x)\n\twithout tf_warning or tf_error return error_mark_node instead of\n\temitting pedwarn and handling it.\n\t* semantics.cc (finish_compound_literal): Similarly for C++26\n\tauto{x}.\n\n\t* g++.dg/cpp23/auto-fncast19.C: New test.\n\n\n\tJakub",
    "diff": "--- gcc/cp/typeck2.cc.jj\t2026-02-06 11:18:47.091639968 +0100\n+++ gcc/cp/typeck2.cc\t2026-02-16 11:27:50.385010224 +0100\n@@ -2610,9 +2610,13 @@ build_functional_cast_1 (location_t loc,\n \t      return error_mark_node;\n \t    }\n \t  else if (cxx_dialect < cxx23)\n-\t    pedwarn (loc, OPT_Wc__23_extensions,\n-\t\t     \"%<auto(x)%> only available with \"\n-\t\t     \"%<-std=c++23%> or %<-std=gnu++23%>\");\n+\t    {\n+\t      if ((complain & tf_warning_or_error) == 0)\n+\t\treturn error_mark_node;\n+\t      pedwarn (loc, OPT_Wc__23_extensions,\n+\t\t       \"%<auto(x)%> only available with \"\n+\t\t       \"%<-std=c++23%> or %<-std=gnu++23%>\");\n+\t    }\n \t}\n       else\n \t{\n--- gcc/cp/semantics.cc.jj\t2026-02-12 18:49:18.465869495 +0100\n+++ gcc/cp/semantics.cc\t2026-02-16 11:28:28.803359539 +0100\n@@ -3874,9 +3874,13 @@ finish_compound_literal (tree type, tree\n \t  return error_mark_node;\n \t}\n       else if (cxx_dialect < cxx23)\n-\tpedwarn (input_location, OPT_Wc__23_extensions,\n-\t\t \"%<auto{x}%> only available with \"\n-\t\t \"%<-std=c++23%> or %<-std=gnu++23%>\");\n+\t{\n+\t  if ((complain & tf_warning_or_error) == 0)\n+\t    return error_mark_node;\n+\t  pedwarn (input_location, OPT_Wc__23_extensions,\n+\t\t   \"%<auto{x}%> only available with \"\n+\t\t   \"%<-std=c++23%> or %<-std=gnu++23%>\");\n+\t}\n       type = do_auto_deduction (type, compound_literal, type, complain,\n \t\t\t\tadc_variable_type);\n       if (type == error_mark_node)\n--- gcc/testsuite/g++.dg/cpp23/auto-fncast19.C.jj\t2026-02-16 11:43:24.524190997 +0100\n+++ gcc/testsuite/g++.dg/cpp23/auto-fncast19.C\t2026-02-16 11:42:24.750203226 +0100\n@@ -0,0 +1,12 @@\n+// PR c++/120685\n+// { dg-do compile { target c++11 } }\n+// { dg-options \"\" }\n+\n+template <typename T>\n+void foo (decltype (auto (T ())) x) {}\t// { dg-warning \"'auto\\\\\\(x\\\\\\)' only available with\" \"\" { target c++20_down } }\n+\n+int\n+main ()\n+{\n+  foo <int> (1);\t\t\t// { dg-error \"no matching function for call to 'foo<int>\\\\\\(int\\\\\\)'\" \"\" { target c++20_down } }\n+}\n",
    "prefixes": []
}