This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libgfortran] PR32611 Print sign of negative zero


On 7/10/07, Tobias Burnus <burnus@ph2.uni-koeln.de> wrote:
> On Mon, Jul 09, 2007 at 07:57:44PM -0700, Jerry DeLisle wrote:
> > Do you think it better to have a separate compiler option like
> > -fsign-zero?

I like this idea. Other compilers have similar things:
[snip]

Is there actually any code beyond the NIST testsuite that requires
unsigned zeros? There already seems to exist patches to bring it up to
F95 level, http://www.fortran-2000.com/ArnaudRecipes/fcvs21_f95.html
so if there is no real code depending on that behaviour the better
choice would perhaps be to change the testsuite? We already have way
more options than the most users can be bothered to worry about.

Steve Kargl wrote:
> I'd rather see -std=f77.
I prefer -fsign-zero or similar: First, it is also part of Fortran 90 not
only of FORTRAN 77; secondly, I know no one who wants to go through all
restrictions of F77 to create a -std=f77 option.

I agree; seems that there is little F77 code that is actually strictly standards-conforming, so a std=f77 option would be of little use. If unsigned zeros should belong to any -std=, I'd prefer std=legacy like in the original proposal.

> For -std=gnu, which is the default behavior, gfortran should output the
> minus.
I agree.

Me too. IMHO, the latest standard + whatever extensions that don't conflict with said standard is the right choice for the default behaviour (roughly speaking).

--
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]