puzzled by 'cc1: error: unrecognized command line option "-fdefault-real-8"'

Tim Prince n8tm@aol.com
Sat Oct 23 20:04:00 GMT 2010


On 10/23/2010 11:45 AM, Anthony Rollett wrote:
> Apologies if the solution to this is obvious but I have a macbook, with 10.6, up to date XCode, openmpi, gfortran (from http://r.research.att.com/tools/) installed.  Am trying to compile an mpi f90 program for which the options include -fdefault-real-8.  I get the error message in the subject line.  I tried using -r8 but I then get errors that suggest that real variables are being left as real*4, and not real*8.  If anyone can illuminate my ignorance I would be most grateful!
> Tony Rollett, Carnegie Mellon
>
This is the usual behavior of most compilers.  Although real*4 isn't 
covered by any standards (it's IBM 360 compatibility syntax), it's 
generally taken to protect against options such as -fdefault-real-8, 
which will be understood only by gfortran, not by gcc.  As the doc says

`-fdefault-real-8'
      Set the default real type to an 8 byte wide type.  Do nothing if
      this is already the default.

Default real means real with no * qualifier.


-- 
Tim Prince



More information about the Fortran mailing list