This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help using f77
- To: egcs at egcs dot cygnus dot com
- Subject: Re: Help using f77
- From: toon at moene dot indiv dot nluug dot nl
- Date: 19 Nov 1999
Carmen Lucia Tancredo Borges wrote:
I have a program written in Fortran that runs on an IBM RS/6000
worstation. When I tried to compile it using g77 on RedHat 6.0 installed
on a Pentium III PC, I got an error msg because an string is assigned to
a variable without the explicit declaration of the CHARACTER type. Here
is the msg:
DATA BRANCO /' '/
^
Type disagreement between expressions at (?) and (^).
The variable BRANCO was not previously declared as CHARACTER. If I do
so, the compiler passes.
Since my program is composed of more than 500 subroutines and this
problem occurs on many of them, I am looking for a compiler directive
that allows this initialization. In the 'info g77', I found the
-fugly-init directive, but setting it produces no difference.
Could you please help me find out what is the correct directive or any
other way in which I can quickly solve this problem?
- - - - -
There is no compile time option to allow this, rather pre-historic
initialisation of REAL variables by CHARACTER data.
The best thing to do is to change the offending line(s) with:
DATA BRANCO /4H /
(initialisation via "Hollerith strings" is allowed).
BTW, IBM probably really _loves_ your description of their machine
(a worstation ?) :-)
Cheers,
Toon.