From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107960 invoked by alias); 15 Jan 2019 18:28:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 107947 invoked by uid 89); 15 Jan 2019 18:28:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt1-f193.google.com Received: from mail-qt1-f193.google.com (HELO mail-qt1-f193.google.com) (209.85.160.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Jan 2019 18:28:02 +0000 Received: by mail-qt1-f193.google.com with SMTP id t33so4104559qtt.4 for ; Tue, 15 Jan 2019 10:28:01 -0800 (PST) Return-Path: Received: from [192.168.1.115] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id e26sm48220667qtg.69.2019.01.15.10.27.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 10:27:59 -0800 (PST) Subject: Re: [REVISED PATCH 2/9]: C++ P0482R5 char8_t: Core language support To: Tom Honermann , Christophe Lyon Cc: gcc-patches References: <84731895-95a5-f4d3-f444-169fa7441080@honermann.net> <6b5fa6fa-be71-7bae-527f-162c01a821d1@honermann.net> From: Jason Merrill Message-ID: <585f4136-fda3-645b-ed7a-977166370f83@redhat.com> Date: Tue, 15 Jan 2019 18:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <6b5fa6fa-be71-7bae-527f-162c01a821d1@honermann.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00863.txt.bz2 On 1/15/19 10:50 AM, Tom Honermann wrote: > On 1/15/19 1:51 AM, Christophe Lyon wrote: >> On Mon, 14 Jan 2019 at 20:59, Jason Merrill wrote: >>> On 12/23/18 9:27 PM, Tom Honermann wrote: >>>> Attached is a revised patch that addresses changes in P0482R6 as >>>> well as >>>> feedback provided by Jason.  Changes from the prior patch include: >>>> - Updated the value of the __cpp_char8_t feature test macro to 201811 >>>>     per P0482R6. >>>> - Enable char8_t support with -std=c++2a per adoption of P0482R6 in >>>>     San Diego. >>>> - Reverted the unnecessary changes to gcc/gcc/c/c-typeck.c as requested >>>>     by Jason. >>>> - Removed unnecessary checks of 'flag_char8_t' within the C++ front >>>>     end as requested by Jason. >>>> - Corrected the regression spotted by Jason regarding initialization of >>>>     signed char and unsigned char arrays with string literals. >>>> - Made minor changes to the error message emitted for ill-formed >>>>     initialization of char arrays with UTF-8 string literals.  These >>>>     changes do not yet implement Jason's suggestion; I'll follow up >>>> with a >>>>     separate patch for that due to additional test impact. >>>> >>>> Tested on x86_64-linux. >>> I just applied the compiler changes with small modifications, as >>> follows; thank you very much for the patches.  Jonathan should check in >>> the library portion before long. >>> >>> Jason >> Hi, >> >> The new testcase g++.dg/ext/utf-cvt-char8_t.C fails at least on arm >> and aarch64: >> >> g++.dg/ext/utf-cvt-char8_t.C  -std=gnu++14  (test for warnings, line 24) >> g++.dg/ext/utf-cvt-char8_t.C  -std=gnu++17  (test for warnings, line 24) > > Arm and aarch64 have unsigned char by default, so the warning > ("conversion to 'char' from 'char8_t' may change the sign of the > result") isn't emitted on those platforms.  I presume adding > '-fsigned-char' to the options for the test would be a sufficient fix? > If so, a patch is attached. Applied, thanks. Jason