This is the mail archive of the 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: Problem in cxx_fundamental_alignment_p?

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
case that
uses [[gnu::aligned (val)]], with 'val' being an alignment that is
greater than MAX (TYPE_ALIGN_UNIT (long_long_integer_type_node),
          TYPE_ALIGN_UNIT (long_double_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
to you...



	* 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


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