This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [4.5 regression] C++ ignores some aligned attributes
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: Paul Brook <paul at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, Richard Guenther <richard dot guenther at gmail dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, dnovillo at google dot com, froydnj at codesourcery dot com
- Date: Wed, 04 Aug 2010 07:27:12 -0700
- Subject: Re: [PATCH] [4.5 regression] C++ ignores some aligned attributes
- References: <201008041419.o74EJAXY011360@d12av02.megacenter.de.ibm.com>
Ulrich Weigand wrote:
> That said, I have no strong opinion on what the behavior *should* be in
> the case of differing aligned attributes between declaration and definition.
> (However, I would suggest to keep the behavior the same between C and C++
> whereever that makes sense.)
If this were part of the standard, I'd argue it should be one of these
things that is an error but does not require a diagnostic. Leaving out
the "packed" attribute prior in one file is like declaring a variable
with "int" in one place and "char" in another. A linker that cares to
check and issue an error is welcome to do so, but that's not a requirement.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713