HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
New Features in Version A.03.25
Chapter 162
+uc Option for Porting to HP-UX
The +uc option allows you to change the compiler default (signed char) and treat an unqualified (plain)
char data type as unsigned char. This may help in porting code from other environments to
HP-UX.
Predefined String Variable Identifiers for Function Names
As a debugging aid, HP aC++ predefines three string variables for each current function. This functionality
provides compatibility with the C99 standard and with GNU/gcc style coding.
For C99 style coding:
__func__ indicates the function name as it appears in the source.
For GNU/gcc style coding:
__FUNCTION__ indicates the function name as it appears in the source.
__PRETTY_FUNCTION__ indicates the function name, its argument types, and its return type.
You can use the predefined variables in your code, as in the following examples.
For C99 style coding:
void foo() {
printf(“The function name is %s.\n”, __func__);
}
Output from the example would be:
The function name is foo.
For GNU/gcc style coding:
#include <stdio.h>
class a {
public:
sub (int i)
{
printf (“__FUNCTION__ = %s\n”, __FUNCTION__);
printf (“__PRETTY_FUNCTION__ = %s\n”, __PRETTY_FUNCTION__);
}
};
int main (void)
{