From patchwork Fri Nov 4 12:17:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 15489 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp362921wru; Fri, 4 Nov 2022 05:18:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4OFdRVQHoxgDpOceFmYbyyxwg6oJ7bH0eI9oZuXj6ffHdNDDD7Z3N22YdbAztkF5FPdPZf X-Received: by 2002:a17:907:1b22:b0:741:8809:b4e6 with SMTP id mp34-20020a1709071b2200b007418809b4e6mr34376298ejc.84.1667564304300; Fri, 04 Nov 2022 05:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667564304; cv=none; d=google.com; s=arc-20160816; b=VMm7syR43ZC8PD+IHbkHW1ulGLpWaey6M7k0qvYIES0WT8GKz1GzuaM+2TtPtEeP1D TvI5OWF7JiX5W7801wyp5WBSV4f2O4sL7ikWjEdNOelF72fJ7OiirGuNZFZteij9kNjq lYzkbqVLJOalYtOph6leF47WGUSU0G+5F0Vjcrks7U5q09wr0So4z3mzRpxeU37z+i0L 9AJy1innjgwCX6Fo5ESYUc9Z4G9etfoL/4KFM4dQ9z4xCoBPkpNYopn99G18V3qsu8Jv HtmsblxlcXG/PVjay11+3aHL7A0B57de4FpgWDuecCM4Fz9hz62yRBsw0xHHth5apAqx JWjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=DZjk4Pijs/jno+N5Aevg0F78RZYHUoCPNe/qvZ+FnGk=; b=OuQ1WdFWKg7KM8bJxtjlPrHv5eu4Guo0hRW3I3TRfl/Q8pk0udOeCb0Lptr3k3matu jgawBWaCltMy6q6QOp3v1zK1TTPAec9qqzZqGXkib424X8E2wpozPsoF591Fx8XRvy7C aY50BlpRdGqZUvwhSMs/s7361pjVop9G4CWBQgxXbaJtyzxza9Up1A7htcH/mo4meWFF uaa1vBI6OliQ+saMy5E4YE7ZZVS9qaspY/QckfxnMeFWHSsLDkf3hZ3h/ylAwRbRDN5w nOCjjRDqizfU3QUJsFtwslws/cOirIrNXj9BRJyXTcD9mtpJV0f6Cbf0J6gNIYDfNHXs cODQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SPCwx2Iq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g12-20020a056402090c00b004622c1b8597si6139907edz.407.2022.11.04.05.18.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 05:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SPCwx2Iq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 12D8B3858439 for ; Fri, 4 Nov 2022 12:18:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12D8B3858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667564303; bh=DZjk4Pijs/jno+N5Aevg0F78RZYHUoCPNe/qvZ+FnGk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SPCwx2IqkYCnursejwBR0N/Pyxf9H1Bi9KEgoW0c/s11kKSoxBOCaj84vhMcJRf0X ZjypY1OzEg6PPsosyCX+YhDu1MfgniTrZlyQBt7D67nT+yT1ZcLRsg21YAxQ7KcVtk Q8dJ7co/JcNhRyXwSc+JmLIwVw4n2GzN0cneSnq4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A05703858D38 for ; Fri, 4 Nov 2022 12:17:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A05703858D38 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-ttNQlImtN32hAfEE0J2_6Q-1; Fri, 04 Nov 2022 08:17:35 -0400 X-MC-Unique: ttNQlImtN32hAfEE0J2_6Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 823E8811E81 for ; Fri, 4 Nov 2022 12:17:35 +0000 (UTC) Received: from localhost (unknown [10.33.37.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BB37C15BA4 for ; Fri, 4 Nov 2022 12:17:35 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] doc: Document correct -fwide-exec-charset defaults [PR41041] Date: Fri, 4 Nov 2022 12:17:34 +0000 Message-Id: <20221104121734.828189-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748567908009475956?= X-GMAIL-MSGID: =?utf-8?q?1748567908009475956?= OK for trunk and release branches? -- >8 -- As shown in the PR, the default is not UTF-32 but rather UTF-32BE or UTF-32LE, avoiding the need for a byte order mark in literals. gcc/ChangeLog: PR c/41041 * doc/cppopts.texi: Document -fwide-exec-charset defaults correctly. --- gcc/doc/cppopts.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 75c56a368ca..c0a92b37018 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -318,9 +318,10 @@ supported by the system's @code{iconv} library routine. @opindex fwide-exec-charset @cindex character set, wide execution Set the wide execution character set, used for wide string and -character constants. The default is UTF-32 or UTF-16, whichever -corresponds to the width of @code{wchar_t}. As with -@option{-fexec-charset}, @var{charset} can be any encoding supported +character constants. The default is one of UTF-32BE, UTF-32LE, UTF-16BE, +or UTF-16LE, whichever corresponds to the width of @code{wchar_t} and the +big-endian or little-endian byte order being used for code generation. As +with @option{-fexec-charset}, @var{charset} can be any encoding supported by the system's @code{iconv} library routine; however, you will have problems with encodings that do not fit exactly in @code{wchar_t}.