From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113476 invoked by alias); 18 Jan 2019 23:02:15 -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 113443 invoked by uid 89); 18 Jan 2019 23:02:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Jan 2019 23:02:13 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0125283F4C for ; Fri, 18 Jan 2019 23:02:12 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-69.ams2.redhat.com [10.36.116.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97C7F600CC; Fri, 18 Jan 2019 23:02:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x0IN29Bs013967; Sat, 19 Jan 2019 00:02:10 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x0IN28fA013966; Sat, 19 Jan 2019 00:02:08 +0100 Date: Fri, 18 Jan 2019 23:02:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix gcc.dg/utf-array.c testcase Message-ID: <20190118230208.GY30353@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg01109.txt.bz2 Hi! The utf-array.c testcase FAILs e.g. on i686-linux or powerpc-linux, the problem is that wchar_t there isn't int, but long int. grep shows that WCHAR_TYPE is one of int short int long int unsigned int short unsigned int long unsigned int depending on exact target and options. The following patch accepts them all, ok for trunk? 2019-01-18 Jakub Jelinek * gcc.dg/utf-array.c: Allow wchar_t to be printed as {long ,short ,}{unsigned ,}int. --- gcc/testsuite/gcc.dg/utf-array.c.jj 2019-01-18 00:33:20.867980701 +0100 +++ gcc/testsuite/gcc.dg/utf-array.c 2019-01-18 23:32:57.086524528 +0100 @@ -12,13 +12,13 @@ typedef __CHAR32_TYPE__ char32_t; const char s_0[] = "ab"; const char s_1[] = u"ab"; /* { dg-error "from a string literal with type array of" } */ const char s_2[] = U"ab"; /* { dg-error "from a string literal with type array of" } */ -const char s_3[] = L"ab"; /* { dg-error "from a string literal with type array of .int." } */ +const char s_3[] = L"ab"; /* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." } */ const char s_4[] = u8"ab"; const char16_t s16_0[] = "ab"; /* { dg-error "from a string literal with type array of .char." } */ const char16_t s16_1[] = u"ab"; const char16_t s16_2[] = U"ab"; /* { dg-error "from a string literal with type array of" } */ -const char16_t s16_3[] = L"ab"; /* { dg-error "from a string literal with type array of .int." "" { target { ! wchar_t_char16_t_compatible } } } */ +const char16_t s16_3[] = L"ab"; /* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char16_t_compatible } } } */ const char16_t s16_4[] = u8"ab"; /* { dg-error "from a string literal with type array of .char." } */ const char16_t s16_5[0] = u"ab"; /* { dg-warning "chars is too long" } */ @@ -30,7 +30,7 @@ const char16_t s16_9[4] = u"ab"; const char32_t s32_0[] = "ab"; /* { dg-error "from a string literal with type array of .char." } */ const char32_t s32_1[] = u"ab"; /* { dg-error "from a string literal with type array of" } */ const char32_t s32_2[] = U"ab"; -const char32_t s32_3[] = L"ab"; /* { dg-error "from a string literal with type array of .int." "" { target { ! wchar_t_char32_t_compatible } } } */ +const char32_t s32_3[] = L"ab"; /* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char32_t_compatible } } } */ const char32_t s32_4[] = u8"ab"; /* { dg-error "from a string literal with type array of .char." } */ const char32_t s32_5[0] = U"ab"; /* { dg-warning "chars is too long" } */ Jakub