From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60707 invoked by alias); 17 Aug 2017 23:41:43 -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 60672 invoked by uid 89); 17 Aug 2017 23:41:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Aug 2017 23:41:38 +0000 Received: by mail-io0-f177.google.com with SMTP id j32so28227596iod.0 for ; Thu, 17 Aug 2017 16:41:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uhdbV4g5qH2gR1v3YAygaYZ0GKtJiE4hZUnh6TQehhU=; b=RdJ9kHUoplq7GoAoYgIm07yZGzHRlqh5V1IWTZXjPw0dpEjXZ/30dA9GSVBIwp1GHx Ti0MLQIGigQR2aJAh6eUWbwOCqrkQcDgO5OoyZBO5leNKsyA5b35jN+hddPdiXR5VvGK k4e2WyvGCXZLtj7nK9Vcyz5LeKN5lAKVdwOC9vv81Gf4F3cvsuFvV2K18wTaJZFVM4hY 06RfFKSNZoMC0XgMFa3j4z7Kp7CAgUDa7bOgVkzbavictwALd2isrIAS68T9Y7AnYnof 0c7tzwrdoCmbpykhSLzFURB3xp3x24v/ebW5j+qkDrgs8lILcjwEg/5XSJWPUQUIa0jb 1/Tg== X-Gm-Message-State: AHYfb5iJFPAyQoactSdHzZexklGz5NMARPq2f6bsQKzNgzob0hn018Rt zrPHsx1FvXjoPpBTJHwtkXysmnPlr4i7 X-Received: by 10.107.36.17 with SMTP id k17mr7030295iok.129.1503013296376; Thu, 17 Aug 2017 16:41:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.63.195 with HTTP; Thu, 17 Aug 2017 16:41:15 -0700 (PDT) In-Reply-To: References: <6c6c268d-a40b-cfa9-574c-ad235f9205b7@gmail.com> <4a4ac20f-9c27-4844-55dc-38ff56ac138b@gmail.com> <20170616115455.GA3457@gmail.com> <20170708134504.GA1303@gmail.com> From: Jason Merrill Date: Fri, 18 Aug 2017 01:40:00 -0000 Message-ID: Subject: Re: RFC: [PATCH] Add warn_if_not_aligned attribute To: "H.J. Lu" Cc: Joseph Myers , Martin Sebor , GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg01102.txt.bz2 On Thu, Aug 17, 2017 at 7:56 AM, H.J. Lu wrote: > On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers wrote: >> On Sat, 8 Jul 2017, H.J. Lu wrote: >> >>> +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} >>> +@opindex Wpacked-not-aligned >>> +@opindex Wno-packed-not-aligned >>> +Warn if a structure field with explicitly specified alignment in a >>> +packed struct or union is misaligned. For example, a warning will >>> +be issued on @code{struct S}, like, @code{warning: alignment 1 of >>> +'struct S' is less than 8}, in this code: >> >> Use @samp for warnings quoted in the manual, as previously discussed. >> >> OK with that change, in the absence of C++ maintainer objections within 48 >> hours. >> > > Here is the updated patch. I moved c++ changes to merge_decls, where > alignment is merged, and check_bitfield_type_and_width, where bit-fields > are checked. OK. Jason