| United States-English |
|
|
|
![]() |
HP Itanium-based Systems: HP aC++/HP C Programmer's Guide > Chapter 2 Command-Line OptionsPorting Options |
|
Use the following options as necessary when porting your code from other operating environments to HP-UX. -fast The -fast option selects a combination of optimization options for optimum execution speed and reasonable build times. Currently chosen options are:
You can override any of the options in -fast by specifying a subsequent option after it. This option is equivalent to +Ofast. Use this option when porting C++ and C applications compiled on other UNIX operating systems to HP-UX.
+sb The +sb option specifies unqualified char, short, int, long, and long long bitfields as signed. The default is +sb.
+ub The +ub option specifies 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 char. The default is +ub. +uc By default, all unqualified char data types are treated as signed char. Specifying +uc causes an unqualified (plain) char data type to be treated as unsigned char. (Overloading and mangling are unchanged.) Use this option to help in porting applications from environments where an unqualified (plain) char type is treated as unsigned char.
The +w64bit option enables warnings that help detection of potential problems in converting 32-bit applications to 64-bit. The +w64bit option applies only to a 64-bit compile (using +DD64). The option is equivalent to the +M2 option. The +wdriver option enables warnings for PA-RISC options that would otherwise be ignored silently on Integrity servers. With the addition of this option in version A.06.05, a number of warnings for PA options that had been reported by previous compiler versions were changed to be silently ignored by default. The intent is to give good PA-RISC to Integrity makefile compatibility by default, but provide this option to help users clean up unnecessary or misleading use of legacy options when desired. This option allows the user to identify areas in their source code that might have porting issues when going between little-endian and big-endian. +wendian will warn of a de-reference that could cause endian-dependent behavior:
This warning can be suppressed by adding an extra cast:
+wendian warns that the initialization which may be endian-dependent, such as using hex constants to init byte arrays:
This warning can be suppressed by not using a hex/octal constant:
+wendian also warns of unions that make assumptions about data layout:
This warning can be suppressed by adding a dummy member:
Another type of warning is on the use of IO functions that read/write persistent data from files that may be endian-dependent:
This warning can be suppressed by adding an extra cast:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||