------- Comment #8 from sgk at troutmask dot apl dot washington dot edu  
2008-02-17 18:09 -------
Subject: Re:  IBITS gives compiler error

On Sun, Feb 17, 2008 at 01:10:06PM -0000, dominiq at lps dot ens dot fr wrote:
> 
> I dont want to rant again about gfortran feature, but nevertheless I'll repeat
> that this error should not be the default behavior (even a warning will an
> overkill that should be restricted to -std=f* -pedantic).

You're more than welcomed to submit a patch.

> Now I think the gfortran behavior is inconsistent with this respect. The
> following code
> 
> print *, not(0), iand(-1,-1)!, ibits (-1, 0, bit_size (0))
> print *, ibset(2147483647, bit_size(0)-1)
> end
> 
> compiles silently and the executable prints:
> 
>           -1          -1
>           -1
> 
> Why 2**32-1 should give an error as the result of ibits(-1, 0, bit_size (0))
> and -1 as the result of ibset(2147483647, bit_size(0)-1)?

I don't remember the details for NOT() other than the simplification
isn't simply because of the internal representation with GMP and 
GMP does not have a mpz_not function.  So, NOT() may accidentally get
the expected answer.  I'm unfamiliar with the other functions you 
mentioned.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35223

Reply via email to