From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, Joseph Myers <joseph@codesourcery.com>
Cc: nd@arm.com, Martin Sebor <msebor@gmail.com>,
Jason Merrill <jason@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: RFC: [PATCH] Add warn_if_not_aligned attribute
Date: Mon, 21 Aug 2017 12:02:00 -0000 [thread overview]
Message-ID: <599ABD0B.2000603@arm.com> (raw)
In-Reply-To: <CAMe9rOo6GSf3JycjWwkhD1iQVa5z-duwXAqu-3Q8gDzCfW8gzg@mail.gmail.com>
On 17/08/17 15:56, H.J. Lu wrote:
> On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers <joseph@codesourcery.com> 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.
>
> Tested on x86-64 and i686.
>
i assume packed semantics is same on arm so these
should warn on arm too ?
on arm i see:
FAIL: gcc.dg/pr53037-2.c (test for warnings, line 8)
FAIL: gcc.dg/pr53037-2.c (test for warnings, line 16)
FAIL: gcc.dg/pr53037-2.c (test for warnings, line 32)
FAIL: gcc.dg/pr53037-3.c (test for warnings, line 8)
FAIL: gcc.dg/pr53037-3.c (test for warnings, line 16)
FAIL: gcc.dg/pr53037-3.c (test for warnings, line 32)
FAIL: g++.dg/pr53037-2.C -std=gnu++98 (test for warnings, line 6)
FAIL: g++.dg/pr53037-2.C -std=gnu++98 (test for warnings, line 16)
FAIL: g++.dg/pr53037-2.C -std=gnu++98 (test for warnings, line 29)
FAIL: g++.dg/pr53037-2.C -std=gnu++11 (test for warnings, line 6)
FAIL: g++.dg/pr53037-2.C -std=gnu++11 (test for warnings, line 16)
FAIL: g++.dg/pr53037-2.C -std=gnu++11 (test for warnings, line 29)
FAIL: g++.dg/pr53037-2.C -std=gnu++14 (test for warnings, line 6)
FAIL: g++.dg/pr53037-2.C -std=gnu++14 (test for warnings, line 16)
FAIL: g++.dg/pr53037-2.C -std=gnu++14 (test for warnings, line 29)
FAIL: g++.dg/pr53037-3.C -std=gnu++98 (test for warnings, line 6)
FAIL: g++.dg/pr53037-3.C -std=gnu++98 (test for warnings, line 16)
FAIL: g++.dg/pr53037-3.C -std=gnu++98 (test for warnings, line 29)
FAIL: g++.dg/pr53037-3.C -std=gnu++11 (test for warnings, line 6)
FAIL: g++.dg/pr53037-3.C -std=gnu++11 (test for warnings, line 16)
FAIL: g++.dg/pr53037-3.C -std=gnu++11 (test for warnings, line 29)
FAIL: g++.dg/pr53037-3.C -std=gnu++14 (test for warnings, line 6)
FAIL: g++.dg/pr53037-3.C -std=gnu++14 (test for warnings, line 16)
FAIL: g++.dg/pr53037-3.C -std=gnu++14 (test for warnings, line 29)
next prev parent reply other threads:[~2017-08-21 10:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-04 15:52 H.J. Lu
2017-06-05 15:11 ` Joseph Myers
2017-06-05 17:45 ` H.J. Lu
2017-06-06 16:07 ` Martin Sebor
2017-06-06 16:11 ` Martin Sebor
2017-06-06 16:59 ` H.J. Lu
2017-06-06 17:35 ` Martin Sebor
2017-06-06 22:57 ` H.J. Lu
2017-06-07 0:11 ` Martin Sebor
2017-06-07 13:30 ` H.J. Lu
2017-06-08 17:00 ` H.J. Lu
2017-06-08 19:13 ` Martin Sebor
2017-06-09 13:31 ` H.J. Lu
2017-06-15 15:38 ` Martin Sebor
2017-06-15 15:47 ` H.J. Lu
2017-06-15 17:31 ` Joseph Myers
2017-06-16 11:55 ` H.J. Lu
2017-07-06 15:45 ` Joseph Myers
2017-07-08 13:45 ` H.J. Lu
2017-08-17 14:19 ` Joseph Myers
2017-08-17 16:23 ` H.J. Lu
2017-08-18 1:40 ` Jason Merrill
2017-08-21 12:02 ` Szabolcs Nagy [this message]
2017-08-21 12:57 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=599ABD0B.2000603@arm.com \
--to=szabolcs.nagy@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=msebor@gmail.com \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).