HPlogo HP C/HP-UX Programmer's Guide: Workstations and Servers > Chapter 6 Migrating C Programs to HP-UX

Typedefs

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

The HP C compiler does not allow combining type specifiers with typedef names.

For example:

     typedef long t;
unsigned t var;

Compilers derived from pcc accept this code, but HP C does not. Change the typedef to include the type specifier:

     typedef unsigned long t;
t var;

or use a define:

     #define t long
unsigned t var;
© Hewlett-Packard Development Company, L.P.