This is the mail archive of the
mailing list for the GCC project.
Re: Problem in cxx_fundamental_alignment_p?
- From: Jeff Law <law at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>, Dodji Seketeli <dodji at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 13 Jul 2016 15:57:44 -0600
- Subject: Re: Problem in cxx_fundamental_alignment_p?
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
On 07/01/2016 03:56 AM, Bernd Schmidt wrote:
On 07/01/2016 10:34 AM, Dodji Seketeli wrote:
The patch below was bootstrapped and tested on x86_64-linux, without
The patch looks good to me, thanks.
Alright. I think we need a C frontend maintainer or maybe Jason to
approve it. Attaching again.
but I'm not convinced this code is covered by any testcase.
Hmhm, looking at the test cases, accompanying the initial patch that
introduced that code, I agree. I guess we should probably add a test
uses [[gnu::aligned (val)]], with 'val' being an alignment that is
greater than MAX (TYPE_ALIGN_UNIT (long_long_integer_type_node),
in the g++.dg/cpp0x/gen-attrs-*.C series of tests?
I really don't know what this code is even doing, so I'll leave that up
* c-common.c (cxx_fundamental_alignment_p): Use TYPE_ALIGN_UNIT,
FWIW, this patch is OK. It'd be even better if we had a testcase.
A patch making cxx_fundamental_alignment_p static, removing its
protototype from c-common.h is pre-approved as AFAICT
cxx_fundamental_alignment_p is not used outside c-common.c