Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2219614/?format=api
{ "id": 2219614, "url": "http://patchwork.ozlabs.org/api/patches/2219614/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260403152625.616890-1-sloosemore@baylibre.com/", "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": "<20260403152625.616890-1-sloosemore@baylibre.com>", "list_archive_url": null, "date": "2026-04-03T15:26:24", "name": "[PUSHED] doc: Improve documentation of -Wchar-subscripts and char signedness [PR94182]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6dc3a9a5dcdb83fb3506d4926819e36f35fbf5d8", "submitter": { "id": 87955, "url": "http://patchwork.ozlabs.org/api/people/87955/?format=api", "name": "Sandra Loosemore", "email": "sloosemore@baylibre.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260403152625.616890-1-sloosemore@baylibre.com/mbox/", "series": [ { "id": 498643, "url": "http://patchwork.ozlabs.org/api/series/498643/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498643", "date": "2026-04-03T15:26:24", "name": "[PUSHED] doc: Improve documentation of -Wchar-subscripts and char signedness [PR94182]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498643/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2219614/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2219614/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 (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=pCKBEVX6;\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 (2048-bit key,\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=pCKBEVX6", "sourceware.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com", "sourceware.org; spf=pass smtp.mailfrom=baylibre.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.210.51" ], "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 4fnMys0kszz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 02:27:00 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E76E84BA9000\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 3 Apr 2026 15:26:58 +0000 (GMT)", "from mail-ot1-f51.google.com (mail-ot1-f51.google.com\n [209.85.210.51])\n by sourceware.org (Postfix) with ESMTPS id 6F8844BA2E0A\n for <gcc-patches@gcc.gnu.org>; Fri, 3 Apr 2026 15:26:31 +0000 (GMT)", "by mail-ot1-f51.google.com with SMTP id\n 46e09a7af769-7d751ef36ccso1309521a34.0\n for <gcc-patches@gcc.gnu.org>; Fri, 03 Apr 2026 08:26:31 -0700 (PDT)", "from nenufar.hsd1.co.comcast.net ([2601:281:d901:97c0::9a27])\n by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7dbc05e73f0sm1064710a34.2.2026.04.03.08.26.29\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 03 Apr 2026 08:26:29 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org E76E84BA9000", "OpenDKIM Filter v2.11.0 sourceware.org 6F8844BA2E0A" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 6F8844BA2E0A", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 6F8844BA2E0A", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775229991; cv=none;\n b=OrtPbeRp0VUaIR9tISBUFOkdjkpH4zNuNVVzuNh6CdJi9HLJsGQHUrYIVttFveciFIs/b70rrUoiy9k3xTaZ41b+O3FDzjjYpelA4pdyPoPEOiwnn4QlsOKKCNSxPAw8qNjKQ3TubN8KRIGJ9/Cuk2XgGXSFJqtRMCUa4k63wjU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775229991; c=relaxed/simple;\n bh=b75aNaqpsKgkHL2EMxaGHiHTSmP79WnGMuVyXQwJIWk=;\n h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version;\n b=RaxZxfQHlx+PNV2dQkHVheFrXSlrsYODrgpQB6K1BGsNwkxDte1fAeSL5PLZKxJRDYiD64l98Wc+peE/X3bJsSpyRAbipg7yLoIA1LmvDiovGNAkDkva29w/XxUEMhsxQEkVLbszytNUXXRMBHLtIn2r9ZwALzldpT8d4UkInuY=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775229990;\n x=1775834790;\n darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=ELx02Z+fZN5/pi7PVQUeCGXD/fPyidaRdaf1BipUWX0=;\n b=pCKBEVX6Otz9zuKKJQDvKPtw7lsq+JRmjvsHOygQj+PayJKM0Jq38Qse6Qbcnf+9z9\n CYDPD2aGDQlowaI3BqmAqOBd5+hHKBWFBJKYI4L0MDqQoyYruHYNz1DrSChHZ+S+kXDE\n g6TRqmFu3AwpYY+0rBk+rEbcez5sGbrIJhce1eKxfyF/ewrA4ny5BwBQtjcGaXn3HDvJ\n wFkLoLXmHOQA9+9ejkcvhV4jSi7d1buDQJmQ4CcZTZkZMkIVv7KRzter5556ZUZ7FGR1\n Sl4868+jO9eEUWm0O50Vj5N385eQUXBL67skgJ8rGmiNoVjK79fuhkBZWxNg+EWWYG8o\n fCrA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775229990; x=1775834790;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=ELx02Z+fZN5/pi7PVQUeCGXD/fPyidaRdaf1BipUWX0=;\n b=INFnx/9qStv5ODg9BmHUVOs+nJtRoB5itpUE8TiuIUOwJDrEiVE4SXs48SaJWs6LkE\n JNpm5q1MHA+fhlQhghHRC2igwMWXAWN0xPbzOknhi10eylPr8kAJkcwFx8yLpTV+r+aL\n FdbxP6eMmgWhgCmrsar31aIGArOQA3xUMeE47u0COwojNAeGljlP8rjuWk8WZ+48lQOs\n RRXs+tWsvy62SQ8qcuOvI0Xv94MtIo1r0+da6itQju2lBhU3mWNSkWYt/7Ut+PH/YOnW\n WSQE+XO3/V4JNV5MWfvxxZGr5BCWyIZkQfjMUwnjcAVs20XY+6iw1h1dE2rdtuhSK1g0\n hqSQ==", "X-Gm-Message-State": "AOJu0YxWSoj7Uct3auq2uwM2i605rj9oqpadNoa+N9KyjWANIrMNRkgG\n qWJij1D1kWtyDJUZ1kh6MwOhYCzMRtWCngb0O/XMeqGOE3u5MAVPfRXSM6trlhsklhBzaMp7Vah\n eyGjM", "X-Gm-Gg": "ATEYQzwVTUOU2P0B8mqIQSQuBkQlUhc6jRF1HUMIMlOGoD+2hBf15GAq/NHKAR1jEQS\n cI9y3P8OR+Uk0Ptu/jCw3/Gg/h9x1N7yuKvlLdQ0Y3DrC3U9aixzx1ElmtYudov0/nUevbPLKLu\n oX14H1oQDrI8gwLfHvnsCdMNMKuwr2CusnFwnODY/TqFCxXVS+DMvoLtZtZAu2UmG9mHtUFZx6M\n mnXyLTWvUqxR3Ksqs8Q+enwhd6mp/DjDZc7hiSq9opedLrd7G9skIB/WwQr9d5oa9qjpoAcWlJ/\n DGJeHwYqbUcoGKyCm+TIvxBvM03xzp7liZONIQIwkFVLL31x3Zag7KXRrkow9IDe4mNlaHm2+m0\n O4TnyraYXQPl593s5CILi+8dkPGwl9so3q4gapOKYszx9I5mbBVaJVI6kUqj70Iu/LYd1FyJmEQ\n 5xlawV8qYVoqqmHoi2/sCUJEzar3YMxkEn", "X-Received": "by 2002:a05:6808:bcb:b0:450:bb4e:8395 with SMTP id\n 5614622812f47-46ef88229abmr1859204b6e.53.1775229990408;\n Fri, 03 Apr 2026 08:26:30 -0700 (PDT)", "From": "Sandra Loosemore <sloosemore@baylibre.com>", "To": "gcc-patches@gcc.gnu.org", "Subject": "[PUSHED] doc: Improve documentation of -Wchar-subscripts and char\n signedness [PR94182]", "Date": "Fri, 3 Apr 2026 09:26:24 -0600", "Message-Id": "<20260403152625.616890-1-sloosemore@baylibre.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "The documentation of -Wchar-subscripts was missing cross-references to\ndiscussion elsewhere in the manual about how the char type may be either\nsigned or unsigned. Besides adding the references, I've also done some\nimprovements to those two other sections.\n\ngcc/ChangeLog\n\tPR other/94182\n\t* doc/implement-c.texi (Characters implementation): Add\n\tcross-reference to more detailed discussion about signedness.\n\t* doc/invoke.texi (C Dialect Options): Combine -fsigned-char\n\tand -funsigned-char table entries since the following discussion\n\tapplies to both. Add an anchor so other things can point at it.\n\t(Warning Options): Add cross-references to the above two places.\n\tClarify that the warning is given regardless of whether char is\n\tsigned or unsigned.\n---\n gcc/doc/implement-c.texi | 4 ++--\n gcc/doc/invoke.texi | 36 +++++++++++++++++++++++-------------\n 2 files changed, 25 insertions(+), 15 deletions(-)", "diff": "diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi\nindex 04d115e8a6f..0439d88fcc9 100644\n--- a/gcc/doc/implement-c.texi\n+++ b/gcc/doc/implement-c.texi\n@@ -150,8 +150,8 @@ range, representation, and behavior as ``plain'' @code{char} (C90\n @opindex fsigned-char\n @opindex funsigned-char\n Determined by ABI@. The options @option{-funsigned-char} and\n-@option{-fsigned-char} change the default. @xref{C Dialect Options, ,\n-Options Controlling C Dialect}.\n+@option{-fsigned-char} change the default.\n+@xref{@code{char} type signedness}.\n \n @item\n @cite{The literal encoding, which maps of the characters of the\ndiff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi\nindex 2c1b60df17c..396aabaea64 100644\n--- a/gcc/doc/invoke.texi\n+++ b/gcc/doc/invoke.texi\n@@ -2907,29 +2907,34 @@ declaration does not use either @code{signed} or @code{unsigned}. By\n default, such a bit-field is signed, because this is consistent: the\n basic integer types such as @code{int} are signed types.\n \n+@anchor{@code{char} type signedness}\n+@cindex @code{char} type signedness\n+@cindex signedness of @code{char} type\n @opindex fsigned-char\n @opindex fno-signed-char\n+@opindex funsigned-char\n+@opindex fno-unsigned-char\n @item -fsigned-char\n-Let the type @code{char} be signed, like @code{signed char}.\n+@itemx -funsigned-char\n+@option{-fsigned-char} lets the type @code{char} be signed,\n+like @code{signed char}, while @option{-funsigned-char} lets\n+the type @code{char} be unsigned, like @code{unsigned char}.\n \n-Note that this is equivalent to @option{-fno-unsigned-char}, which is\n+Note that @option{-fsigned-char}\n+is equivalent to @option{-fno-unsigned-char}, which is\n the negative form of @option{-funsigned-char}. Likewise, the option\n @option{-fno-signed-char} is equivalent to @option{-funsigned-char}.\n \n-@opindex funsigned-char\n-@opindex fno-unsigned-char\n-@item -funsigned-char\n-Let the type @code{char} be unsigned, like @code{unsigned char}.\n-\n-Each kind of machine has a default for what @code{char} should\n-be. It is either like @code{unsigned char} by default or like\n-@code{signed char} by default.\n+Each target supported by GCC has a default for what @code{char} should\n+be, which is typically specified in the processor-specific ABI\n+document for that target. It is either like @code{unsigned char} by\n+default or like @code{signed char} by default.\n \n Ideally, a portable program should always use @code{signed char} or\n @code{unsigned char} when it depends on the signedness of an object.\n But many programs have been written to use plain @code{char} and\n expect it to be signed, or expect it to be unsigned, depending on the\n-machines they were written for. This option, and its inverse, let you\n+machines they were written for. These options let you\n make such a program work with the opposite default.\n \n The type @code{char} is always a distinct type from each of\n@@ -7103,8 +7108,13 @@ Both diagnostics are also suppressed by @option{-fms-extensions}.\n @item -Wchar-subscripts\n Warn if an array subscript has type @code{char}. This is a common cause\n of error, as programmers often forget that this type is signed on some\n-machines.\n-This warning is enabled by @option{-Wall}.\n+machines. @xref{Characters implementation}, and\n+@ref{@code{char} type signedness}.\n+\n+This warning is enabled by @option{-Wall}. When enabled, the warning\n+is given regardless of whether @code{char} is unsigned by default on\n+the target, and it is also not affected by the @option{-fsigned-char}\n+or @option{-funsigned-char} options.\n \n @opindex Wno-coverage-mismatch\n @opindex Wcoverage-mismatch\n", "prefixes": [ "PUSHED" ] }