ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] poundbang


From: Joshua Neuheisel
Subject: Re: [RP] poundbang
Date: Thu Mar 4 05:14:05 2004

 Shawn Betts writes:
>
> > "Joshua Neuheisel" writes:
> >
> > > *src/events.c (receive_command): Changed prop_return type to avoid
warnings
> > > *src/manage.c (get_state): Changed data type to avoid warnings
> >
> > I'm actually not getting any warnings about these (I was getting a
> > warning and first thot it was what you fixed). Could you explain the
> > problem? What version of gcc are you using and which platform?
>
> I'm not the OP (and I've lost track of his message) but I just pulled
>     down ratpoison via cvs, and I see these warnings with gcc 3.3.3 on
>     freebsd 5.2 :
>
>     $ grep 'warning' gmake.out
>     ../../ratpoison/src/events.c:504: warning: dereferencing type-punned
>     pointer will break strict-aliasing rules
>     ../../ratpoison/src/manage.c:481: warning: dereferencing type-punned
>     pointer will break strict-aliasing rules
>     $ uname -a
>     FreeBSD Zorthluthik.local.bar 5.2-RELEASE-p2 FreeBSD 5.2-RELEASE-p2
>     #1: Sat Feb 21 18:13:09 MST 2004
>     i386
>     $ gcc -v
>     Using built-in specs.
>     Configured with: FreeBSD/i386 system compiler
>     Thread model: posix
>     gcc version 3.3.3 [FreeBSD] 20031106

In addition to the setup listed by the previous poster, the original patch
fixed the same warnings on my i686 Linux box running gcc 3.4 prerelease
(March 1, 2004).  To be fair, these warnings are in fact true: the code did
break the aliasing rules, which a compiler is allowed to enforce when
perfoming optimizations.
Joshua



reply via email to

[Prev in Thread] Current Thread [Next in Thread]