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 64-bit Porting and Transition Guide: HP 9000 Computers > Chapter 4 Transitioning C and aC++ Programs to 64-bit Mode

Step 2: Identify Non-Portable Constructs

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Use the HP C compiler or lint to find non-portable code when transitioning C programs to the LP64 data model.

A specialized lint tool, such as FlexeLint, can be purchased separately to help you convert 32-bit aC++ code to 64-bit code.

To turn on LP64 warnings when compiling C programs, use the +M2 and +DD64 (or +M2 and +DA2.0W) command line options:

cc +DD64 +M2 -c myprog.c

This command line compiles in ANSI mode with HP value-added extensions (-Ae is the default since the HP-UX 10.30 release), turns on 64-bit porting warnings with +M2, suppresses linking with -c, and creates a 64-bit object module with +DD64.

lint provides the same 64-bit porting warnings as the HP C compiler.

NOTE: lint additionally performs parameter checking on function calls that span compilation units.

To turn on LP64 warnings in lint, use the +M2 and +DD64 options:

lint +DD64 +M2 myprog.c

You should address all LP64 warnings issued by HP C before creating a 64-bit application.

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