[Ffmpeg-devel] Stack alignment warning

Uoti Urpala uoti.urpala
Fri Dec 15 23:31:21 CET 2006

> 2006/12/15, Ismail Donmez <ismail at pardus.org.tr>:
> > I get the following warning on Linux with gcc 3.4.6 :
> >
> > Compiler did not align stack variables. Libavcodec has been miscompiled

Do you get that with newer gcc? What distro (could there be any
nonstandard settings)? I've never seen that warning with gcc 4.1 on
Debian unstable.

On Fri, 2006-12-15 at 22:05 +0200, Ivan Kalvachev wrote:
> As of the moment it is know that all released gcc versions could
> trigger the above warning, gcc 4.2 is expected to avoid it

4.2 adds a function attribute to generate code to explicitly align the
stack when entering that function (which could be used for entry points
from code which might not keep the stack aligned). Are you talking about
that or something else?

>  (support stack aligned local arrays)

The warning test in ffmpeg does not use arrays (it's a single int
variable), and the alignment does seem to work for arrays too in gcc

More information about the ffmpeg-devel mailing list