GNU bug report logs - #766
23.0.60; interesting warning during compilation

Previous Next

Package: emacs;

Reported by: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>

Date: Sat, 23 Aug 2008 09:05:11 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 766 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> suse.de>,
        bug-gnu-emacs <at> gnu.org, Peter_Dyballa <at> Freenet.DE
Subject: bug#766: 23.0.60; interesting warning during compilation
Date: Wed, 03 Sep 2008 14:47:14 -0400
>> > If someone has suggestions how to avoid this warning without making
>> > code ugly and unreadable, and preferably without system-dependent
>> > #ifdef's, I'm all ears.
>> 
>> EMACS_INT high_ino = s.st_ino >> 31 >> 1;

> Thanks.  Can we be reasonably sure that GCC will not become smart
> enough some day to flag this as well?

I don't think anybody can guarantee it, but usually it's a bad idea to
output warnings about post-optimization code, so you may hope that GCC
will optimize "x >> 31 >> 1" to "x >> 32" without ever outputing
a warning about the silliness of the end result.

Then again, the present code shows that even outputting a warning about
"x >> 32" is already borderline annoying, so there's no guarantee gcc
won't become more annoying in the future.


        Stefan




This bug report was last modified 16 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.