[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: Minimum integer values
From:       Paul Brook <paul () codesourcery ! com>
Date:       2003-12-27 15:23:34
Message-ID: 200312271523.34883.paul () codesourcery ! com
[Download RAW message or body]

On Thursday 25 December 2003 11:28 pm, Scott Robert Ladd wrote:
<snip>

FWIW I think I agree with most of this discussion.

> Section 13.7.1 has its merits; if anything, declaring explicit symmetry
> is a Good Thing from the standpoint of mathematical logic. and clearly
> J3 decided symmetry was a Good Thing, since they kept it in the proposed
> standard.
>
> HOWEVER, it still stands that the code in question compiles with other
> compilers, and that some sort of compatibility switch is desirable for
> situations where gfortran may interact with other compilers and
> programming languages.

The standard also specifies that negative values have a processor defined 
(possibly undefined?) representation for bit operations. However in practice 
twos complement integer representation is standard. I'm fairly sure this is 
the case for every machine GCC supports.

> I would be more than happy to implement such a switch -- say,
> -fasymmetrical-integers?

Please do. You might need to check things like unbounded ranges on case 
statements and the MIN/MAX intrinsics, but I think they do the right thing 
anyway.

Paul


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic