From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14666 invoked by alias); 12 Jan 2017 10:01:28 -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 14634 invoked by uid 89); 12 Jan 2017 10:01:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=23AM, 23am 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; Thu, 12 Jan 2017 10:01:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87F0783F40; Thu, 12 Jan 2017 10:01:26 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0CA1Ogw002546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Jan 2017 05:01:25 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v0CA1JbQ004303; Thu, 12 Jan 2017 11:01:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v0CA1G54004302; Thu, 12 Jan 2017 11:01:16 +0100 Date: Thu, 12 Jan 2017 10:01:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Joseph Myers , gcc-patches@gcc.gnu.org Subject: Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs Message-ID: <20170112100116.GT21933@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00798.txt.bz2 On Thu, Jan 12, 2017 at 10:52:23AM +0100, Richard Biener wrote: > > I'll give the (short) 1 parsing a try though to see how awkward it > > really gets. > > Ok, doesn't look a good way to go. Apart from making it difficult > to handle in the parser you can't distinguish a conversion from an > integer literal and a short literal for > > short s; > s_1 = (short) 1; As there are tons of types the integer literals can have, wouldn't it be better to just introduce _Literal where you could supply the type if it is not one where C provides a suffix for it or int? Then we could avoid adding lots of suffixes for new and newer types. Of course for integer literals with int, unsigned int, {,unsigned} long {,long} one would still use no suffix, U, {,U}L{,L} suffixes. > It looks like we currently have no way to write __int128 literals in C? > > __int128 x = 0xffffeeeeffffeeeeffffeeeeffffeeee; Yeah, one typically has to use __int128 x = (((unsigned __int128) 0xffffeeeeffffeeeeULL) << 64) | 0xffffeeeeffffeeeeULL; or something similar. Jakub