HP aC++/HP ANSI C A.06.27 Release Notes
printf(" total hours billed = %Da\n", sumH);
printf(" total amount billed = %Da\n", sumB);
return 0;
}
Notes:
• The quantize functions do the work of rounding to the desired number of places to the right
of the decimal point. They return the value of their first argument represented with the quantum
exponent of their second argument, rounding if necessary.
• Mixing decimal FP and integer operands, as in the expression m / 60, is allowed. However,
the expression m / 60.0, which mixes decimal and binary FP, would cause an error.
• On the HP-UX implementation, BID data could be read directly into the decimal FP variable
m, without the need of decoding. However, that code would not be portable to systems that
use DPD encoding for their decimal FP types.
• Restoring the default rounding has no effect in this program, except perhaps if the ASCII input
had more than 16 decimal digits, but doing so is a good programming practice.
+annotate=structs (New)
The +annotate=structs option annotates the compiled binary with accesses to C/C++ struct
fields for use by other external tools such as Caliper. By default, no annotations are added.
+check=lock (New)
The new runtime +check=lock option enables the checking of locking discipline violations; for
example, whether appropriate locks are held when threads access shared data in applications
using Posix threads. Refer the online programmer's guide for additional detail and code example.
Note that +check=lock is not enabled by +check=all.
+check=thread (New)
The new runtime +check=thread option enables the batch-mode thread-debugging features of
HP WDB. This feature requires HP WDB 5.9 or later. The following thread-related conditions can
be detected with +check=thread:
• The thread attempts to acquire a nonrecursive mutex that it currently holds.
• The thread attempts to unlock a mutex or a read-write lock that it has not acquired.
• The thread waits (blocked) on a mutex or read-write lock that is held by a thread with a different
scheduling policy.
• Different threads non-concurrently wait on the same condition variable, but with different
associated mutexes.
• The threads terminate execution without unlocking the associated mutexes or read-write locks.
• The thread waits on a condition variable for which the associated mutex is not locked.
• The thread terminates execution, and the resources associated with the terminated thread
continue to exist in the application because the thread has not been joined or detached.
• The thread uses more than the specified percentage of the stack allocated to the thread.
The +check=thread option should only be used with multithreaded programs. It is not enabled
by +check=all.
+O[no]autopar now supported in C++ Mode (New)
The +O[no]autopar option introduced in version A.06.15 of the compiler was supported only
when compiling C or Fortran files. Version A.06.20 also supports this option when compiling C++
files. In addition, specifying +Oautopar now implies the -mt option.
28 Product changes in earlier versions