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: [PATCH] [4.5 regression] C++ ignores some aligned attributes


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


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