This is the mail archive of the gcc@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: Forward declarations and variable alignment weirdness


> > PR45112. See also http://gcc.gnu.org/ml/gcc-patches/2010-08/msg00283.html
> 
> Thanks a lot for info.
> If I got the discussion right, it's ok for the definition to use more
> strict alignment than the declaration.

Not quite. Any mismatch is user error, and may cause nasal daemons.
Whether this actually causes failures depends on the context, and you can 
construct code that fails either way. In practice giving the definition greater 
alignment than the declaration will probably lead to sub-optimal code rather 
than active borkage.

Paul


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