This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: [PATCH] Add warn_if_not_aligned attribute


On Thu, 15 Jun 2017, H.J. Lu wrote:

> On Thu, Jun 15, 2017 at 8:38 AM, Martin Sebor <msebor@gmail.com> wrote:
> >>
> >> Where do we go from here?
> >
> >
> > Other than the C and C++ maintainers needing to approve the patch
> > I can't think of anything else.
> 
> Hi Joseph, Jason,
> 
> The complete patch is at
> 
> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00541.html
> 
> Is this OK for trunk?

I'd expect the warning calls to include OPT_Wif_not_aligned or 
OPT_Wpacked_not_aligned (as appropriate, depending on what triggered the 
warning / would disable it), so the warning output includes an option 
name.

As the attribute is specific to fields I'd expect testcases that use of it 
on non-fields is diagnosed.  And I think the diagnostic for that should 
include quotes, %<warn_if_not_aligned%>.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]