Re: ANSI C complaints under MacOS X

Paul et al,
  I have had similar problems +/- with the Lahey compiler under Win32/CygWin:

  http://www.cwr.uwa.edu.au/~slawinski/work/netcdfinfo.html#WinNT

and had to make a fix for that. Unfortunately I do not remember your problem happening when I compiled the NetCDF libs on my MaxOS X box or when they are used. But then again we use the f77 bindings.

Setup is:

  MacOS 10.1.3
  NetCDF 3.5.0
  Absoft Pro Fortran 7.0b


  FC = f77
  F90 = f90
  CPPFLAGS = -DNDEBUG -DAbsoftProFortran

The only warning or error I get is:

cc -c -O -I. -DNDEBUG -DAbsoftProFortran -DVERSION=`cat ../VERSION` libvers.c
MEMORY:1: warning: malformed floating constant

and that I am not to worried about.

At 7:57 AM -1000 14/3/02, Paul Wessel wrote:
Hi group-

I am linking programs (GMT) with the netcdf library (3.5.0) under MacOS X.
The MacOS X cc compiler (based on gcc) gives warnings for
lines 190 and 193 in netcdf.h, saying

ANSI C forbids const or volatile functions

The offending lines are:

EXTERNL const char *
nc_inq_libvers(void);

EXTERNL const char *
nc_strerror(int ncerr);

I get no such warnings under Linux.  While they are just warnings and cause no
problems it is annoying to see them and if the message about ANSI C is true
then shouldn't netcdf.h take the const declarations out?

Cheers,

---------------------------------------
Paul Wessel, Professor and Chair
Dept. of Geology & Geophysics
SOEST, University of Hawaii at Manoa
1680 East-West Road, Honolulu, HI 96822

phone/fax: (808) 956-4778/5154
email:     pwessel@xxxxxxxxxx
web:       www.soest.hawaii.edu/wessel
---------------------------------------


--
---
                                              TTFN  Dirk  =:>

/--------------------------------------------------------------\
|    Dirk Slawinski     |    The Centre for Water Research     |
|  Research Associate   |   University of Western Australia    |
|                       |      CRICOS Provider No 00126G       |
|                                                              |
| PHONE:  +61 8 9380 2410                        ,-_|\         |
|   FAX:  +61 8 9380 1015               (Perth) /     \   ]]   |
| EMAIL:  slawinski@xxxxxxxxxxxxxx              *_,-._/  d")   |
|   WEB:  http://www.cwr.uwa.edu.au/~slawinski/      v   _(@)_ |
\--------------------------------------------------------------/

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: