Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

compiling with pgCC

This is continuing the question about using Portland Group pgCC to compile netcdf_c++. I'm using netcdf-3.6.2-beta3. The warning that occurs is

  integer conversion resulted in a change of sign
  static const ncbyte ncBad_byte = NC_FILL_BYTE;

In the archives of 20030217, Russ said this was an error in PG versions
< 4.0.  However, I am getting it with version 6.0.  So, I dug around the
netcdf source, and I'm still confused.

in netcdf.h (showing line numbers)
65 #define NC_FILL_BYTE ((signed char)-127)

and in ncvalues.h (showing line numbers)
18 typedef unsigned char ncbyte;
...
35 static const ncbyte ncBad_byte = NC_FILL_BYTE;

It seems there is indeed an issue with signed versus unsigned char.  Am
I missing something?  And in the meantime, how safe am I to redefine
NC_FILL_BYTE to ((unsigned char)0) ?

I realize g++ works, but I want to use the PG profiler with my software
that links to libnetcdf_c++.

rorik

--
Rorik Peterson
Univ. Alaska, Fairbanks



==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690