Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Systems: HP C/HP-UX Release Notes > Chapter 1 HP C/HP-UX Release Notes

New Features in Version B.11.11.06

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

HP C compiler version B.11.11.06 supports the following new features:

__FUNCTION__ Predefined Identifier

__FUNCTION__ is a predefined pointer to char defined by the compiler, which points to the name of the function as it appears in the source program.

NOTE: __FUNCTION__ is same as __func__ of C99.

The implementation of __FUNCTION__ adheres to C99 (as per 6.4.2.2 Predefined Identifies) standards.

+ub Option

The +ub option treats unqualified char, short, int, long and long long bitfields as unsigned. This option has no effect on signedness of enum bitfields or on signedness of non-bitfield character.

UTF-16 Character Support

The current compiler supports only ASCII strings or characters (8 bit chars with no transliteration) as UTF-16. UTF-16 is described in the Unicode Standard, version 3.0 [UNICODE]. The definitive reference is Annex Q of ISO/IEC 10646-1 [ISO-10646].

Any string or character which is preceded by u is recognized as a UTF-16 literal or character and is stored as an unsigned short type.

Example:

  #define _UTF16(x) u##x
#define UTF16(y) _UTF16(#y)
typedef unsigned short utf16_t;
utf16_t *utf16_str = UTF16(y); // u”y”
int size = sizeof(u’t’); // size of 2 bytes

-mt Option

The new -mt option enables multi-threading capability without the need to set any other flags, such as -l and -D. HP C compiler sets the appropriate flags as required.

  • -D_REENTRANT

  • -D_HPUX_SOURCE

  • -D__POSIX_C_SOURCE=199506L

  • libpthread

Following macros are used to compile multi-thread source code:

  • _REENTRANT - Required by system header files that provide reentrant functions (suffixed by _r).

  • _HPUX_SOURCE - Required by HP C system header files.

  • _POSIX_C_SOURCE=199506L - Required by pthread.

  • libpthread.* - Kernel thread library used on 11.x systems.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.