Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196658/?format=api
{ "id": 2196658, "url": "http://patchwork.ozlabs.org/api/patches/2196658/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/yddecmly7ss.fsf_-_@CeBiTec.Uni-Bielefeld.DE/", "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": "<yddecmly7ss.fsf_-_@CeBiTec.Uni-Bielefeld.DE>", "list_archive_url": null, "date": "2026-02-15T22:13:23", "name": "[COMMITTED,v2] Change int8_t to signed char on Solaris [PR113450,PR123176]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "dab8a23bdb3306ad31b64f85abd0b1a817d6bd5d", "submitter": { "id": 4362, "url": "http://patchwork.ozlabs.org/api/people/4362/?format=api", "name": "Rainer Orth", "email": "ro@CeBiTec.Uni-Bielefeld.DE" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/yddecmly7ss.fsf_-_@CeBiTec.Uni-Bielefeld.DE/mbox/", "series": [ { "id": 492235, "url": "http://patchwork.ozlabs.org/api/series/492235/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492235", "date": "2026-02-15T22:13:23", "name": "[COMMITTED,v2] Change int8_t to signed char on Solaris [PR113450,PR123176]", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/492235/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196658/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196658/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=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de\n header.a=rsa-sha256 header.s=20200306 header.b=Khc9PqUT;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de\n header.a=rsa-sha256 header.s=20200306 header.b=Khc9PqUT", "sourceware.org; dmarc=none (p=none dis=none)\n header.from=CeBiTec.Uni-Bielefeld.DE", "sourceware.org;\n spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de", "server2.sourceware.org;\n arc=none smtp.remote-ip=129.70.160.84" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fDgD85xHQz1xtN\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 09:14:00 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 6016A4BA23C9\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 22:13:58 +0000 (GMT)", "from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE\n [129.70.160.84])\n by sourceware.org (Postfix) with ESMTPS id 60F074BA2E18\n for <gcc-patches@gcc.gnu.org>; Sun, 15 Feb 2026 22:13:26 +0000 (GMT)", "from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1])\n by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 34D3AE11BB;\n Sun, 15 Feb 2026 23:13:25 +0100 (CET)", "from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1])\n by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new,\n port 10026)\n with ESMTP id QMtStHjXwIMM; Sun, 15 Feb 2026 23:13:24 +0100 (CET)", "from manam.CeBiTec.Uni-Bielefeld.DE (p508543ca.dip0.t-ipconnect.de\n [80.133.67.202]) (Authenticated sender: ro)\n by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 69DD0E181D;\n Sun, 15 Feb 2026 23:13:24 +0100 (CET)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 6016A4BA23C9", "OpenDKIM Filter v2.11.0 sourceware.org 60F074BA2E18" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 60F074BA2E18", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 60F074BA2E18", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771193606; cv=none;\n b=XzKJl4NcEbVl5GUK1neNGT266Aspykqt+Orwai68m2isUkjaR66sMioDRcdShEAZuZ8E3nFUvvr/4y+KFkX2iMOVbljfI6h3qfLWbI5YHMmnAl8YmZbkXXjrnjSNQkkzAszd3cdpOuubJUvmghMMo6mG50xU7ZnImvXsmFG+YWk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771193606; c=relaxed/simple;\n bh=rT/t5xXTO1fvSfc6vfdeLbT3zTDog9PFXz6dnlmMTzA=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=tH/GnCHPkCEhoW6dU3+DFBR+8JmQ71QYeUfoTrXR3RQhAJtG9+/pDzcdZRF2tKlCfYQENHXJx2kKkgqkYz1Ij5BWJX6KAf5yTqDtfL2+v4O7Cel8ujhmZHN5d6tKLvZk7vnn7MYEWD5ql/hzKhhNPA4ZpaEEcUt93ygsBCmcYC0=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=\n cebitec.uni-bielefeld.de; h=content-type:content-type\n :mime-version:user-agent:message-id:date:date:references\n :in-reply-to:subject:subject:from:from:received:received; s=\n 20200306; t=1771193604; bh=rT/t5xXTO1fvSfc6vfdeLbT3zTDog9PFXz6dn\n lmMTzA=; b=Khc9PqUTPQ0kt82StC4GHtvZCvhQKk+H2QDG/CaPBOMg97w+RW/Ic\n RELgN5D+6oz7SjMON0V8xjAE0HNAR9q/kyVs9OMBXH4oZw9Uxozk00vBnWNaKcgq\n Im/Wdu/FYyEGg6c6bBKN1OhNK6Wlwnc1PVFGU2JSNtobP3Tf+sphkPOB7NORqEFB\n FcIwPsWwrGmKcoPFCQG9OHA7tYtypP0HUlJjk465/W+UR+Bco7TLtA7T/UlOrEek\n d3UrUzSlhYyBUtxusGxeSIxYAhTdtJDvkX9jKBeh1Ja+9hYaq2E7v8+l7t5PylGR\n 79dXpjPEH1x0w+lz40eUfES8xnL38htFg==", "X-Virus-Scanned": "amavisd-new at cebitec.uni-bielefeld.de", "From": "Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>", "To": "Jonathan Wakely <jwakely@redhat.com>", "Cc": "Richard Biener <richard.guenther@gmail.com>, gcc-patches@gcc.gnu.org,\n Joseph Myers <josmyers@redhat.com>, Iain Buclaw <ibuclaw@gdcproject.org>", "Subject": "[COMMITTED v2] Change int8_t to signed char on Solaris\n [PR113450,PR123176]", "In-Reply-To": "<yddikbxy7yy.fsf@CeBiTec.Uni-Bielefeld.DE> (Rainer Orth's message\n of \"Sun, 15 Feb 2026 23:09:41 +0100\")", "References": "<yddikd2ohbz.fsf@CeBiTec.Uni-Bielefeld.DE>\n <CAFiYyc1Grn+GfJrHwJbQ+2uvm3XrG86aAzh3bQkA4hUhZBcy_A@mail.gmail.com>\n <CACb0b4=aRGnhqwH-G24uOZ6XBJ9LuD3CxyiRrDe0UrXbNWrV5A@mail.gmail.com>\n <yddikbxy7yy.fsf@CeBiTec.Uni-Bielefeld.DE>", "Date": "Sun, 15 Feb 2026 23:13:23 +0100", "Message-ID": "<yddecmly7ss.fsf_-_@CeBiTec.Uni-Bielefeld.DE>", "User-Agent": "Gnus/5.13 (Gnus v5.13)", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"=-=-=\"", "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": "int8_t is currently defined as char in Solaris <sys/int_types.h>\n\n/*\n * Basic / Extended integer types\n *\n * The following defines the basic fixed-size integer types.\n *\n * Implementations are free to typedef them to Standard C integer types or\n * extensions that they support. If an implementation does not support one\n * of the particular integer data types below, then it should not define the\n * typedefs and macros corresponding to that data type. Note that int8_t\n * is not defined in -Xs mode on ISAs for which the ABI specifies \"char\"\n * as an unsigned entity because there is no way to define an eight bit\n * signed integral.\n */\n#if defined(_CHAR_IS_SIGNED)\ntypedef char\t\t\tint8_t;\n#else\n#if defined(__STDC__)\ntypedef signed char\t\tint8_t;\n#endif\n#endif\n\nand _CHAR_IS_SIGNED defined as 1 in <sys/isa_defs.h>. As has long been\nknown, this violates C99, 7.18.1.1, Exact-width integer types.\n\nWhile this works in general nonetheless, it creates constant trouble for\nC++ code as can be seen in PRs libstdc++/113450 and recently\nlibstdc++/123176, but also in LLVM.\n\nWhile Oracle Solaris engineering is amenable to changing int8_t to\nsigned char, this will take time. However, it proved easy to do so now\nusing fixincludes.\n\nThis works for a GCC bootstrap just fine with one exception: as\ndocumented in PR d/123509, libdruntime has its own definition of int8_t\nwhich is now inconsistent with GCC's. This leads to some gdc.test and\nlibphobos testsuite failures, which can easily be fixed with the patch\nattached to that PR. I wouldn't consider this a showstopper for GCC 16\nif that patch wouldn't make it to the release.\n\nHowever, the failures point to another problem: with this change, the\nmangling of\n\n\tvoid func(int8_t);\n\nchanges in C++, creating an ABI break. Fortunately, this isn't seen in\nlibstdc++, so the impact should be reasonable compared to the constant\ntrouble the current definition causes for C++.\n\nBesides, clang already uses\n\n\t#define __INT8_TYPE__ signed char\n\napparently without problems.\n\nIn case users do run into the incompatiblity, the fixed definitions are\nwrapped in #if !defined(_LEGACY_INT8_T)/#endif so there's an easy way back\nto the original definition.\n\nBootstrapped on i386-pc-solaris2.11, amd64-pc-solaris2.11,\nsparc-sun-solaris2.11, and sparcv9-sun-solaris2.11 with only the D\nfailure described above.\n\nI've also run 1-stage and bootstrap builds of LLVM main using a patched\nGCC 16 as bootstrap compiler on amd64-pc-solaris2.11 and\nsparcv9-sun-solaris2.11 without regressions.\n\nCommitted to trunk.\n\n\tRainer", "diff": "# HG changeset patch\n# Parent dd4fbdcc7c6ad4666faefca7c9ac1b1bbabe5636\nChange int8_t to signed char on Solaris [PR113450]\n\ndiff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x\n--- a/fixincludes/fixincl.x\n+++ b/fixincludes/fixincl.x\n@@ -2,11 +2,11 @@\n *\n * DO NOT EDIT THIS FILE (fixincl.x)\n *\n- * It has been AutoGen-ed January 6, 2026 at 04:43:53 PM by AutoGen 5.18.12\n+ * It has been AutoGen-ed February 15, 2026 at 01:39:03 PM by AutoGen 5.18.12\n * From the definitions inclhack.def\n * and the template file fixincl\n */\n-/* DO NOT MERGE THIS FILE, EITHER Tue Jan 6 16:43:53 CET 2026\n+/* DO NOT MERGE THIS FILE, EITHER Sun Feb 15 13:39:03 CET 2026\n *\n * You must regenerate it. Use the ./genfixes script.\n *\n@@ -15,7 +15,7 @@\n * certain ANSI-incompatible system header files which are fixed to work\n * correctly with ANSI C and placed in a directory that GNU C will search.\n *\n- * This file contains 250 fixup descriptions.\n+ * This file contains 251 fixup descriptions.\n *\n * See README for more information.\n *\n@@ -7871,6 +7871,54 @@ static const char* apzSolaris_Int_Limits\n \n /* * * * * * * * * * * * * * * * * * * * * * * * * *\n *\n+ * Description of Solaris_Int8_T fix\n+ */\n+tSCC zSolaris_Int8_TName[] =\n+ \"solaris_int8_t\";\n+\n+/*\n+ * File name selection pattern\n+ */\n+tSCC zSolaris_Int8_TList[] =\n+ \"sys/int_types.h\\0\";\n+/*\n+ * Machine/OS name selection pattern\n+ */\n+tSCC* apzSolaris_Int8_TMachs[] = {\n+ \"*-*-solaris2*\",\n+ (const char*)NULL };\n+\n+/*\n+ * content selection pattern - do fix if pattern found\n+ */\n+tSCC zSolaris_Int8_TSelect0[] =\n+ \"^[ \\t]*typedef[ \\t]*char[ \\t]*int(|_fast|_least)8_t.*\";\n+\n+/*\n+ * content bypass pattern - skip fix if pattern found\n+ */\n+tSCC zSolaris_Int8_TBypass0[] =\n+ \"_LEGACY_INT8_T\";\n+\n+#define SOLARIS_INT8_T_TEST_CT 2\n+static tTestDesc aSolaris_Int8_TTests[] = {\n+ { TT_NEGREP, zSolaris_Int8_TBypass0, (regex_t*)NULL },\n+ { TT_EGREP, zSolaris_Int8_TSelect0, (regex_t*)NULL }, };\n+\n+/*\n+ * Fix Command Arguments for Solaris_Int8_T\n+ */\n+static const char* apzSolaris_Int8_TPatch[] = {\n+ \"format\",\n+ \"#if !defined(_LEGACY_INT8_T)\\n\\\n+typedef signed char int%18_t;\\n\\\n+#else\\n\\\n+%0\\n\\\n+#endif\",\n+ (char*)NULL };\n+\n+/* * * * * * * * * * * * * * * * * * * * * * * * * *\n+ *\n * Description of Solaris_Math_12 fix\n */\n tSCC zSolaris_Math_12Name[] =\n@@ -10235,9 +10283,9 @@ static const char* apzX11_SprintfPatch[]\n *\n * List of all fixes\n */\n-#define REGEX_COUNT 289\n+#define REGEX_COUNT 291\n #define MACH_LIST_SIZE_LIMIT 187\n-#define FIX_COUNT 250\n+#define FIX_COUNT 251\n \n /*\n * Enumerate the fixes\n@@ -10434,6 +10482,7 @@ typedef enum {\n SOLARIS_INT_CONST_FIXIDX,\n SOLARIS_INT_LIMITS_1_FIXIDX,\n SOLARIS_INT_LIMITS_3_FIXIDX,\n+ SOLARIS_INT8_T_FIXIDX,\n SOLARIS_MATH_12_FIXIDX,\n SOLARIS_POW_INT_OVERLOAD_FIXIDX,\n STATSSWTCH_FIXIDX,\n@@ -11451,6 +11500,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {\n SOLARIS_INT_LIMITS_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,\n aSolaris_Int_Limits_3Tests, apzSolaris_Int_Limits_3Patch, 0 },\n \n+ { zSolaris_Int8_TName, zSolaris_Int8_TList,\n+ apzSolaris_Int8_TMachs,\n+ SOLARIS_INT8_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,\n+ aSolaris_Int8_TTests, apzSolaris_Int8_TPatch, 0 },\n+\n { zSolaris_Math_12Name, zSolaris_Math_12List,\n apzSolaris_Math_12Machs,\n SOLARIS_MATH_12_TEST_CT, FD_MACH_ONLY,\ndiff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def\n--- a/fixincludes/inclhack.def\n+++ b/fixincludes/inclhack.def\n@@ -3931,6 +3931,28 @@ fix = {\n };\n \n /*\n+ * Solaris <sys/int_types.h> defines int8_t as char which violates C99.\n+ * Same for int_fast8_t and int_least8_t.\n+ */\n+fix = {\n+ hackname = solaris_int8_t;\n+ files = sys/int_types.h;\n+ mach = '*-*-solaris2*';\n+ bypass = '_LEGACY_INT8_T';\n+ c_fix = format;\n+ c_fix_arg = \"#if !defined(_LEGACY_INT8_T)\\n\"\n+ \"typedef signed char int%18_t;\\n\"\n+ \"#else\\n\"\n+ \"%0\\n\"\n+ \"#endif\";\n+ select = \"^[ \\t]*typedef[ \\t]*char[ \\t]*int(|_fast|_least)8_t.*\";\n+ test_text =\n+ \"typedef char int8_t;\\n\"\n+ \"typedef char int_fast8_t;\\n\"\n+ \"typedef char int_least8_t;\";\n+};\n+\n+/*\n * Some versions of Solaris 10+ <math.h> #undef libstdc++-internal macros.\n */\n fix = {\ndiff --git a/fixincludes/tests/base/sys/int_types.h b/fixincludes/tests/base/sys/int_types.h\nnew file mode 100644\n--- /dev/null\n+++ b/fixincludes/tests/base/sys/int_types.h\n@@ -0,0 +1,28 @@\n+/* DO NOT EDIT THIS FILE.\n+\n+ It has been auto-edited by fixincludes from:\n+\n+\t\"fixinc/tests/inc/sys/int_types.h\"\n+\n+ This had to be done to correct non-standard usages in the\n+ original, manufacturer supplied header file. */\n+\n+\n+\n+#if defined( SOLARIS_INT8_T_CHECK )\n+#if !defined(_LEGACY_INT8_T)\n+typedef signed char int8_t;\n+#else\n+typedef char int8_t;\n+#endif\n+#if !defined(_LEGACY_INT8_T)\n+typedef signed char int_fast8_t;\n+#else\n+typedef char int_fast8_t;\n+#endif\n+#if !defined(_LEGACY_INT8_T)\n+typedef signed char int_least8_t;\n+#else\n+typedef char int_least8_t;\n+#endif\n+#endif /* SOLARIS_INT8_T_CHECK */\ndiff --git a/gcc/config/sol2.h b/gcc/config/sol2.h\n--- a/gcc/config/sol2.h\n+++ b/gcc/config/sol2.h\n@@ -49,9 +49,11 @@ along with GCC; see the file COPYING3. \n \n #define SIG_ATOMIC_TYPE \"int\"\n \n-/* ??? This definition of int8_t follows the system header but does\n- not conform to C99. Likewise int_fast8_t, int_least8_t. */\n-#define INT8_TYPE \"char\"\n+/* <sys/int_types.h> uses char (which is signed) to define int8_t, which does\n+ not conform to C99, 7.18.1.1 Exact-width integer types. Likewise\n+ int_fast8_t, int_least8_t. Until this is fixed, it's handled by\n+ fixincludes. */\n+#define INT8_TYPE \"signed char\"\n #define INT16_TYPE \"short int\"\n #define INT32_TYPE \"int\"\n #define INT64_TYPE (LONG_TYPE_SIZE == 64 ? \"long int\" : \"long long int\")\n@@ -60,7 +62,7 @@ along with GCC; see the file COPYING3. \n #define UINT32_TYPE \"unsigned int\"\n #define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? \"long unsigned int\" : \"long long unsigned int\")\n \n-#define INT_LEAST8_TYPE \"char\"\n+#define INT_LEAST8_TYPE \"signed char\"\n #define INT_LEAST16_TYPE \"short int\"\n #define INT_LEAST32_TYPE \"int\"\n #define INT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? \"long int\" : \"long long int\")\n@@ -69,7 +71,7 @@ along with GCC; see the file COPYING3. \n #define UINT_LEAST32_TYPE \"unsigned int\"\n #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? \"long unsigned int\" : \"long long unsigned int\")\n \n-#define INT_FAST8_TYPE \"char\"\n+#define INT_FAST8_TYPE \"signed char\"\n #define INT_FAST16_TYPE \"int\"\n #define INT_FAST32_TYPE \"int\"\n #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? \"long int\" : \"long long int\")\n", "prefixes": [ "COMMITTED", "v2" ] }