[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 971208: Bug when creating float attribute



> From: Tom LeFebvre <address@hidden>
> To: Russ Rew <address@hidden>
> CC: address@hidden, address@hidden
> Subject: Re: 971208: Bug when creating float attribute 

Hi Tom,

> Thanks to one of our staff members, Mike Romberg, we found the problem
> when creating float attributes.  As it turns out the HP C++ compiler
> has a +a switch that determines whether ANSI C or C&R C stlye is
> produced.  The default is the C&R. The +a1 switch causes ANSI C to be
> generated.  The problem is that the all object code MUST be generated
> using the same switch or problems like these arise.  The linker
> provided no warnings that this was the case. 
> 
> In our case the netCDF library was generated with one switch and our
> application was generated with the other.  When we synced them up the
> problem I sent to you went away.
> 
> I hope we didn't waste a lot of your time chasing this one down.  I
> was always skeptical that the problem was in netCDF since this was a
> very basic operation.  Sorry for the false alarm.
> 
> The lesson learned here is the HP compiler leaves MUCH to be desired.
> We're switching over to the GCC compiler ASAP.
> 
> You may want to include the complier switch story in your
> documentation, so that others are not subject to the same fate.
> 
> As always, thanks for looking into this.  Have a great holiday.

Thanks for the information on this one.  (I assume you meant "K&R"
instead of "C&R" above.)

It turns out this one "slipped through the cracks" here, so no one had
even looked at it yet.  I'm filing it in the email support database, so
anyone else who encounters this problem might find your note.  We'll try
to put something in the INSTALL notes about this for HPUX systems.  I
suspect there are compiler flags on many systems that cause problems
when an application and libraries are compiled with inconsistent values
of the flag, but there ought to be a warning when this happens.

--Russ