This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: fortran build issue with gcc4!!!
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Puneet Dhir <pdhir01 at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Thu, 12 Jan 2006 09:41:02 -0800
- Subject: Re: fortran build issue with gcc4!!!
- References: <6d0b744f0601112325t492d2c55y3559082d6bd83e4c@mail.gmail.com>
On Thu, Jan 12, 2006 at 12:55:08PM +0530, Puneet Dhir wrote:
>
> But when compiling with GCC 4 we are getting syntax error for
> declaration, on investigation we found that in fortran we can write
> hexadecimal number like that
>
> '3FEF6EFA44990F7F'Z OR Z'3FEF6EFA44990F7F'
The post-fix BOZ is not in any of the Standards. g77
allows this form, but is not standard conforming.
> But when compling with GCC 4 we have changed the declaration as given
> below, then we are able to compile fortran
> program without any problem.
>
>
> real*8 ans1(300) /
> x Z'3FEF6EFA44990F7F',Z'3FE7C5DB1052981B',
> x Z'3FE3138B03281255',Z'3FDF50C1B0D410BF',
> x Z'3FCFADAFCDCFCD1E',Z'3FDFDBB3EA934931',
> x Z'3FDA92E8A8CC8C3E',Z'3FBAFC714E46E2CD',
>
> Can you suggest me is there any compiler flags for backward
> compability because when we tried to compile declaration like
> Z'3FEF6EFA44990F7F'
> in older GCC, it was giving some syntax error. this is needed bcoz i
> want to maintian the same code for both the compilers.
I would need to see an example of the actual code to make any comment.
g77 should support the prefix BOZ forms.
But, as stated by another poster, you should upgrade to gcc 4.1
(pre-release) for your Fortran compiler. There is also the
possibility of sticking with gcc-3.4.5 or earlier.
--
Steve