[FFmpeg-devel] [PATCH 4/7] Use alias-safe types in AV_[RW] macros
Michael Niedermayer
michaelni
Fri Feb 19 13:28:35 CET 2010
On Fri, Feb 19, 2010 at 01:31:40AM -0500, Alexander Strange wrote:
>
> On Feb 18, 2010, at 11:46 AM, Jason Garrett-Glaser wrote:
>
> >> According to Jason, gcc seemed to require those attributes in some
> >> cases even with the unions. Ask him for details.
> >
> > I think astrange can probably explain better than I can.
> >
> > Dark Shikari
>
> It's documented here:
> http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fstrict_002daliasing-785
i thought someone had code that failed?
the gcc docs never have been completely in line with the compiler, just
thinking about asm here ...
also my tests i did a while ago indicated only problems with direct
type punning, the union alone worked ...
iam thus still in favor of droping may_alias as long as we dont have a
case that actually needs it
>
> Their conclusion (from reading some arguments on lists) is that the C99 spec isn't worded well here; it might be rewritten in C1x.
They either follow the spec or they do not. If they do i dont think may_alias
is needed. If they dont then they should not claim gcc to be a C99 compiler
also C1x cannot fix this, if there really is a problem in the spec a
corrigendum would be needed.
Also iam not sure if iam alone but i really would wish C to simply allow
type punning and immedeate dereference, this would be so much cleaner and
simpler. Anyone has some contacts to the commitee maybe to suggest this? :)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/20100219/649a9182/attachment.pgp>
More information about the ffmpeg-devel
mailing list