From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8AF68469710 for ; Mon, 8 Jun 2020 15:52:22 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id n23so20313931ljh.7 for ; Mon, 08 Jun 2020 05:52:22 -0700 (PDT) Date: Mon, 8 Jun 2020 15:52:18 +0300 From: Cyrill Gorcunov Message-ID: <20200608125218.GC134822@grain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 02/10] cmake: ignore warnings on alignof() and offsetof() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Thu, May 21, 2020 at 10:37:25PM +0200, Vladislav Shpilevoy wrote: > Warning about invalid offsetof() (used on non-POD types) was set > for g++, but wasn't for clang++. > > Warning about invalid alignof() (when expression is passed to it > instead of a type) wasn't ignored, but is going to be very > useful in upcoming unaligned memory access patches. That allows > to write something like: > > struct some_long_type *object = region_aligned_alloc( > region, size, alignof(*object)); > > This will work even if type of 'object' will change in future, > and so it is safer. And shorter. > > Part of #4609 Reviewed-by: Cyrill Gorcunov