From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6398 invoked by alias); 15 Sep 2014 11:32:39 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 6388 invoked by uid 89); 15 Sep 2014 11:32:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 15 Sep 2014 11:32:38 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8FBWabE002637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Sep 2014 07:32:37 -0400 Received: from zebedee.pink ([10.3.113.10]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8FBWZEv026737; Mon, 15 Sep 2014 07:32:36 -0400 Message-ID: <5416CE53.4090803@redhat.com> Date: Mon, 15 Sep 2014 11:32:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: Hei Chan , "gcc-help@gcc.gnu.org" Subject: Re: is portable aliasing possible in C++? References: <1410390231.39617.YahooMailNeo@web140202.mail.bf1.yahoo.com> <54115917.1040602@redhat.com> <1410477938.56522.YahooMailNeo@web140205.mail.bf1.yahoo.com> <5412AF85.1080200@redhat.com> <1410562688.66898.YahooMailNeo@web140201.mail.bf1.yahoo.com> <5413F0D4.5010806@redhat.com> <1410748615.48628.YahooMailNeo@web165004.mail.bf1.yahoo.com> <5416A4E1.1010000@redhat.com> <1410779226.12412.YahooMailNeo@web165006.mail.bf1.yahoo.com> <5416CBC1.50900@redhat.com> <1410780568.23391.YahooMailNeo@web165006.mail.bf1.yahoo.com> In-Reply-To: <1410780568.23391.YahooMailNeo@web165006.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00087.txt.bz2 On 09/15/2014 12:29 PM, Hei Chan wrote: > > > > > > On Monday, September 15, 2014 7:22 PM, Andrew Haley wrote: > >> Using memcpy(), the compiler will have to make a copy >> because it sees that few lines, for example, down, the program tries >> to manipulate the copy. > > So, don't manipulate the copy, then. Use it once, then throw it away. > > Sometimes, due to the endianness, I am forced to manipulate the copy... I don't know what you mean. A small example would help. Andrew.