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: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: 766 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: bug#766: 23.0.60; interesting warning during compilation
Date: Sun, 24 Aug 2008 21:12:02 +0300
> Cc: 766 <at> emacsbugs.donarmstrong.com,
>  bug-gnu-emacs <at> gnu.org
> From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
> Date: Sun, 24 Aug 2008 09:27:16 +0200
> 
> 
> Am 24.08.2008 um 05:13 schrieb Eli Zaretskii:
> 
> > If you mean with sizeof, then the problem is that sizeof is not a
> > preprocessing-time operator, so it cannot prevent the compiler from
> > seeing the offending code.
> 
> You mean
> 
> 	if (sizeof (s.st_ino) > 4)
> 
> introducing the shift operation will fail to keep the compiler from  
> emitting the warning?

Yes, it will fail.  Please try compiling this toy program on a 32-bit
machine, and you will see the same warning.

    int foo (int a)
    {
      if (sizeof (a) > 4)
	return a >> 32;
      else
	return 0;
    }

> Anyway, I think Andreas Schwab's proposition to split the one wide  
> shift into two shorter ones is better.

I agree, I just wanted to be sure that this won't bring the same
warning back at some future time.




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.