H-Series Application Migration Guide (H06.03+)

Native C and C++ Migration Tasks
H-Series Application Migration Guide429855-006
5-6
C89 Flags Changed
NOINSPECT selects:
C89 Flags Changed
These flags are changed in the H-series OSS and PC environments:
Using Conditional Compilation in C and C++ Programs
Programs that use feature test macros to conditionally compile source code for a
specific platform might require changes to ensure correct results when compiled for a
TNS/E platform. For example, the following conditional directives are frequently used
to conditionally compile source code for TNS/R and TNS platforms:
#ifdef TNS_R_TARGET
printf ("Code intended for TNS/R");
#else
printf ("Code intended for TNS");
printf ("Unintentionally compiled for TNS/E");
#endif
However, when this sequence is used in a TNS/E compilation, the source statements
following #else are unintentionally included in the compilation.
G-Series (PIC and
Non-PIC) H-Series
Debug Native Inspect
Flag Reason for Change Action Required
-Wld H-series has new PIC linker Replace with -Weld
-Wnld Non-PIC linker not supported Replace with -Weld
-Wnld_obey (the
corresponding pragma is
LINKFILE, which is
unchanged but submits
commands to eld instead of
nld).
If used on H-series c89
command line, contents of
obey file are passed to eld.
Either leave on command
line or replace with
-Weld_obey.
-Wld_obey (the corresponding
pragma is LINKFILE, which is
unchanged but submits
commands to eld instead of
ld).
If used on H-series c89
command line, contents of
obey file are passed to eld.
Either leave on command
line or replace with
-Weld_obey.
-Wversion1 Version1 C++ dialect not
supported.
Remove or replace with
-Wversion2 or -Wversion3.
-Wextern_data GP-relative addressing not
supported.
Flag ignored, warning
issued. No action required
-Wsrl SRLs not supported Flag ignored, warning
issued. No action required