From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88230 invoked by alias); 16 Apr 2019 14:25:16 -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 88148 invoked by uid 89); 16 Apr 2019 14:25:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:582 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; Tue, 16 Apr 2019 14:25:10 +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 2B7F533025E; Tue, 16 Apr 2019 14:25:09 +0000 (UTC) Received: from localhost (unknown [10.33.36.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id B729760139; Tue, 16 Apr 2019 14:25:07 +0000 (UTC) Date: Tue, 16 Apr 2019 14:50:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR libstdc++/90046 fix build failure on epiphany-elf Message-ID: <20190416142506.GV943@redhat.com> References: <20190411195814.GA3289@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190411195814.GA3289@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-04/txt/msg00645.txt.bz2 On 11/04/19 20:58 +0100, Jonathan Wakely wrote: >The epiphany-elf target aligns structs to 8 bytes, which causes the >static_assert(alignof(_Chunk) == 1) to fail. > >Instead of requiring _Chunks to be positionable at any alignment, ensure >new buffers are aligned to alignof(_Chunk). Because the buffer size is a >power of two, we know that both the buffer size and sizeof(_Chunk) are >multiples of alignof(_Chunk). So is p is aligned to alignof(_Chunk) then Oops, that was meant to say "So if p is aligned to ..."