From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129628 invoked by alias); 6 Apr 2017 15:10:10 -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 128088 invoked by uid 89); 6 Apr 2017 15:10:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,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; Thu, 06 Apr 2017 15:10:08 +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 41B9980498; Thu, 6 Apr 2017 15:10:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 41B9980498 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 41B9980498 Received: from oldenburg.str.redhat.com (dhcp-192-212.str.redhat.com [10.33.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B713899692; Thu, 6 Apr 2017 15:10:05 +0000 (UTC) Subject: Re: [PATCH] Add a new type attribute always_alias (PR79671) To: Jakub Jelinek References: <20170406075104.GA17461@tucnak> <7d17b3b7-2d38-6184-8bd6-eb9f96f87912@redhat.com> <20170406144326.GT4425@redhat.com> <20170406150538.GG17461@tucnak> Cc: Jonathan Wakely , Richard Biener , Bernd Edlinger , GCC Patches , Jason Merrill , Jeff Law From: Florian Weimer Message-ID: <8147b24e-e6a4-5fd9-2e1f-1f72f54b0cee@redhat.com> Date: Thu, 06 Apr 2017 15:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170406150538.GG17461@tucnak> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00306.txt.bz2 On 04/06/2017 05:05 PM, Jakub Jelinek wrote: > On Thu, Apr 06, 2017 at 04:51:01PM +0200, Florian Weimer wrote: >> On 04/06/2017 04:43 PM, Jonathan Wakely wrote: >>> On 06/04/17 16:23 +0200, Richard Biener wrote: >>>> On Thu, 6 Apr 2017, Florian Weimer wrote: >>>> >>>>> On 04/06/2017 04:11 PM, Bernd Edlinger wrote: >>>>> >>>>>> I think it is not too complicated to done in the C++ FE. >>>>>> The FE looks for array of std::byte and unsigned char, >>>>>> and sets the attribute when the final type is constructed. >>>>>> >>>>>> What I am trying to do is just extend the semantic of may_alias >>>>>> a bit, and then have the C++ FE use it in the way it has to. >>>>> >>>>> We also need this for some POSIX and Linux kernel interfaces. A >>>>> C++-only >>>>> solution would not help with that. >>>> >>>> Example(s)? >>> >>> sockaddr_storage comes to mind. >> >> Right. The kernel also has many APIs which return multiple variable-length >> data blocks, such as getdents64, and many more interfaces in combination > > The kernel uses -fno-strict-aliasing I think, so it doesn't care. These APIs (getdents64, inotify, lots of netlink stuff, probably more) extend to user space. Thanks, Florian