gfortran bug or not?
- From: Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx>
- Date: Fri, 24 Aug 2007 15:41:07 GMT
I use the following well-known trick for my numeric kinds:
integer, parameter, public :: sp = kind(1.0)
integer, parameter, public :: dp = selected_real_kind(2*precision(1.0_sp))
integer, parameter, public :: qp_preferred = &
selected_real_kind(2*precision(1.0_dp))
integer, parameter, public :: qp = (1+sign(1,qp_preferred))/2*qp_preferred+ &
(1-sign(1,qp_preferred))/2*dp
When i compile using the latest gfortran on Linux (4.3.0 20070824) i get:
gfortran -c -g -pedantic -Wall -Wimplicit-interface -Wunderflow -fbounds-check -fimplicit-none -std=f95 numeric_kinds.f95
numeric_kinds.f95:31.44:
(1-sign(1,qp_preferred))/2*dp
1
Error: Extension: Evaluation of nonstandard initialization expression at (1)
numeric_kinds.f95:37.45:
(1-sign(1,qp_preferred))/2*dp
1
Error: Extension: Evaluation of nonstandard initialization expression at (1)
Is this indeed an error or is gfortran wrong here? I've been using this
trick for a long time and it is the first time that a compiler complains
about it...
Thanks,
Bart
--
"Share what you know. Learn what you don't."
.
- Follow-Ups:
- Re: gfortran bug or not?
- From: Tobias Burnus
- Re: gfortran bug or not?
- Prev by Date: Shootout Challenge
- Next by Date: Re: gfortran bug or not?
- Previous by thread: Shootout Challenge
- Next by thread: Re: gfortran bug or not?
- Index(es):
Relevant Pages
|