Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226332/?format=api
{ "id": 2226332, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226332/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.8@forge-stage.sourceware.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.8@forge-stage.sourceware.org>", "list_archive_url": null, "date": "2026-04-22T10:49:17", "name": "[v1,08/15] libcpp: Fix incorrect line information for traditional cpp and #include [PR100904]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c3f7aa21dd3659c4bcd17dcaa4fe8e6380e19fd6", "submitter": { "id": 93219, "url": "http://patchwork.ozlabs.org/api/1.2/people/93219/?format=api", "name": "Andrew Pinski via Sourceware Forge", "email": "forge-bot+pinskia@forge-stage.sourceware.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.8@forge-stage.sourceware.org/mbox/", "series": [ { "id": 500990, "url": "http://patchwork.ozlabs.org/api/1.2/series/500990/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500990", "date": "2026-04-22T10:49:12", "name": "copy-prop-arg", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500990/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226332/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226332/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 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; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org", "sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39" ], "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 4g0xpT20H7z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:29:53 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E93704293348\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:29:50 +0000 (GMT)", "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 1D38D41627E4\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:50:34 +0000 (GMT)", "from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id B7DF742BDD\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 10:50:31 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org E93704293348", "OpenDKIM Filter v2.11.0 sourceware.org 1D38D41627E4" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 1D38D41627E4", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 1D38D41627E4", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776855034; cv=none;\n b=oSdZAMmIQ9SyAbSfDFTw6LFXwsBlyHKADQgYVv8qWvS6PUp5aiAkt2XzuiGkhPRLsrmtECrxwzfa883Lt1pVCrGCq0LzoKdVSBRnGhD6HotNfTf4FaIjBY1D11cZeFUKky/Q1ymEKWHnyt7xjEqcP43R6Yi+gE0d5E2tYirSNfk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776855034; c=relaxed/simple;\n bh=WfnRivqXQLmot85M1lYQ1vU3IaokGbzuMBk3FhfUxOk=;\n h=From:Date:Subject:To:Message-ID;\n b=f9CzBd9Te2YI1BdsZOfuA+NjLf4iiBA5DdOx8zlLdllRC7dHdQSrk6Wxo/wdo+xTauf+i8rHojLi5okkG984Ax2Cwhynb8o3OKGMiFf+EeQ/2SvHuldwSRWTIcJa4l02wwQMXxWiM8MTi9JMr+HT4x1nAqKuqL2tCE0sYEz4g4c=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "From": "Andrew Pinski via Sourceware Forge\n <forge-bot+pinskia@forge-stage.sourceware.org>", "Date": "Wed, 22 Apr 2026 10:49:17 +0000", "Subject": "[PATCH v1 08/15] libcpp: Fix incorrect line information for\n traditional cpp and #include [PR100904]", "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>", "Message-ID": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.8@forge-stage.sourceware.org>", "X-Mailer": "batrachomyomachia", "X-Pull-Request-Organization": "gcc", "X-Pull-Request-Repository": "gcc-TEST", "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/33", "References": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.0@forge-stage.sourceware.org>", "In-Reply-To": "\n <bmm.hhubwh7m90.gcc.gcc-TEST.pinskia.33.1.0@forge-stage.sourceware.org>", "X-Patch-URL": "\n https://forge.sourceware.org/pinskia/gcc-TEST/commit/a84127d068bfcaae570bfa9c116730556e337577", "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": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>,\n pinskia@gcc.gnu.org", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "From: Andrew Pinski <quic_apinski@quicinc.com>\n\nAfter r7-1651-gac81cf0b2bf5efdd7, the location for the error for #include would\nbe the location on the token. Except in traditional cpp, the location information\nfor directives is all messed up because first libcpp processes the directive line in traditional\nand copies it to a new buffer and then does the lexing using the ISO lexer. This means the location\ninformation for the tokens are wrong and should just grab the location of the directive line instead.\nThis patch does exactly that. Uses directive line location for traditional cpp when parsing the include.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR preprocessor/100904\n\nlibcpp/ChangeLog:\n\n\t* directives.cc (parse_include): Use the directive line location\n\tfor the location in traditional cpp mode instead of the location\n\tof the token.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/cpp/missing-header-trad-1.c: New test.\n\nSigned-off-by: Andrew Pinski <quic_apinski@quicinc.com>\n---\n gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c | 10 ++++++++++\n libcpp/directives.cc | 9 ++++++++-\n 2 files changed, 18 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c", "diff": "diff --git a/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c b/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c\nnew file mode 100644\nindex 000000000000..d77cc5fe2287\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c\n@@ -0,0 +1,10 @@\n+/* { dg-do preprocess } */\n+/* { dg-options \"-traditional-cpp\" } */\n+\n+/* PR preprocessor/100904 */\n+/* Make sure we error out on the correct line\n+ for traditional cpp. */\n+\n+#include \"nonexistent.h\" /* { dg-error \"-: nonexistent.h\" } */\n+\n+/* { dg-message \"terminated\" \"terminated\" { target *-*-* } 0 } */\ndiff --git a/libcpp/directives.cc b/libcpp/directives.cc\nindex 9c0f77ab0176..d4a5ab1cbec7 100644\n--- a/libcpp/directives.cc\n+++ b/libcpp/directives.cc\n@@ -841,7 +841,14 @@ parse_include (cpp_reader *pfile, int *pangle_brackets,\n \n /* Allow macro expansion. */\n header = get_token_no_padding (pfile);\n- *location = header->src_loc;\n+\n+ /* The location for traditional is the directive line as the\n+ token line information for the temporary buffer. */\n+ if (CPP_OPTION (pfile, traditional))\n+ *location = pfile->directive_line;\n+ else\n+ *location = header->src_loc;\n+\n if ((header->type == CPP_STRING && header->val.str.text[0] != 'R')\n || header->type == CPP_HEADER_NAME)\n {\n", "prefixes": [ "v1", "08/15" ] }