HP C Programmer's Guide (92434-90009)

162 Chapter6
Migrating C Programs to HP-UX
Hexadecimal Escape Sequence
space around the macro invocation.
Hexadecimal Escape Sequence
The HP 9000 Series 700/800 compiler allows character constants containing hexadecimal
escape sequences. For example, can be expressed with the hexadecimal escape sequence .
The HP 9000 Series 200, 300, and 500 do not allow hexadecimal escape sequences.
Check your source files for any occurrences for \x, and verify that a hexadecimal escape
sequence is intended.
Invalid Structure References
The HP 9000 Series 700/800 compiler does not allow structure members to be referenced
through a pointer to a different type of object. The VAX pcc and HP 9000 Series 200 and
500 compilers allow this. Change any invalid structure references to cast the pointer to the
appropriate type before referencing the member. For example, given the following:
struct x {
int y;
}z;
char *c;
c -> y=5;
c -> y=5; is invalid. Instead, use the following code:
c = (char *) &z;
((struct x *) c)->y = 5;
Leading Underscore
External names on the HP 9000 Series 700/800 do not contain a leading underscore. You
need to change any programs that rely on external names containing leading underscores.
Note that all languages on the HP 9000 Series 700/800 follow the same convention.
Therefore, only assembly language code and names that were aliased in other languages
are affected by this. Because there is no leading underscore, external names contain one
additional significant character. Identifiers that differ only in the 255th character will
denote different items on the HP 9000 Series 700/800.