[FFmpeg-devel] [PATCH] deals with code that has no effect when executed

Michael Niedermayer michaelni
Thu May 29 22:48:18 CEST 2008


On Thu, May 29, 2008 at 12:56:52PM -0700, Erik Hovland wrote:
> On Thu, May 29, 2008 at 09:14:10PM +0200, Michael Niedermayer wrote:
> > On Thu, May 29, 2008 at 12:02:15PM -0700, Erik Hovland wrote:
> > > On Thu, May 29, 2008 at 08:20:27PM +0200, Reimar D?ffinger wrote:
> > > > On Thu, May 29, 2008 at 10:57:22AM -0700, Erik Hovland wrote:
> > > > > All of the memset calls rely on the compiler to sizeof the array. If
> > > > > a compiler does this then it is outside of the C standard.
> > > > 
> > > > I'd really like a citation of the C standard for that claim...
> > > 
> > > I guess I should do a better job of qualifying that statement. The C
> > > standard does not allow for the sizeof operator to work on dynamic or
> > > externally define types.
> > > http://en.wikipedia.org/wiki/Sizeof
> > 
> > sigh ...
> > wikipedia is NOT the C standard (and thats a good thing). I wouldnt trust
> > any publically editable source blindly.
> 
> Sorry. I was not trusting it blindly. I read it for accuracy. And it was
> accurate for what it says. But unfortunately for me. I was

wiki says "sizeof is a compile-time operator, which means that during
compilation, sizeof and its operand get replaced by the result-value."

This is simply not true.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080529/ffd0f11c/attachment.pgp>



More information about the ffmpeg-devel mailing list