HP aC++/HP ANSI C A.06.27 Release Notes
6 Known problems and workarounds
This section describes known problems and workarounds. Customers on support can use the product
number to assist them in finding SSB and SRB reports for HP aC++ or HPC. The product number
you can search for is B3910BA.
To verify the product number and version for your HP aC++ or HP C compiler, execute the following
HP-UX commands:
what /opt/aCC/bin/aCC
what /opt/aCC/lbin/ecom
Obsolete LANG-STARTUP files
As of HP aC++ version A.06.15, the LANG-STARTUP fileset is obsoleted because its only two files
are no longer being delivered:
/opt/langtools/lib/hpux32/fastmem.o
/opt/langtools/lib/hpux32/effmem.o
codecvt_byname facet needed for C locale conversions
You must use the codecvt_byname facet to use C locale conversions.
To do locale-specific conversions, the codecvt_byname facet must be installed in the locale:
locale::global(locale("ja_JP.eucJP"));
typedef std::codecvt_byname<wchar_t, char, std::mbstate_t> ucs2utf;
std::wcout.imbue(std::locale(std::locale(),new ucs2utf("ja_JP.eucJP")));
The call to imbue is required because otherwise the default behavior of std:wcout is not defined
with respect to which codevt to use.
Using +check= options and running on test and deployment systems
Using various +check= options requires a fairly recent version of wdb (+check=malloc and
+check=bounds:pointer) and /opt/langtools/lib/hpux##/librtc.so.1 where the
application is run. The debugger and library is automatically updated on the machine only where
the compiler is installed. This may not be true where the application is executed.
Older versions of wdb may cause hangs. Older versions oflibrtc.so.1may produce runtime
unsats.
GPREL22 relocation error
If a variable is declared as extern non-array in one module and then defined as an array in another,
a linker error may occur:
Definition: foo.c:uint64_t variable[SIZE];
Reference: bar.c:extern uint64_t variable;
ld: The value 0xXXX does not fit when applying the relocation GPREL22 for
symbol "variable" at offset 0xYYY in section index ZZZ of file bar.o.
Workaround: The declaration should be changed to:
extern uint64_t variable[];
This error can also occur in assembly code if items <= 8 bytes are put into.data/.bss instead
of .sdata/.sbss.
Workaround (assembler): For "small" variables defined in assembly, change the section name
from .bss to .sbss or .data to .sdata:
44 Known problems and workarounds