HP aC++/HP C A.06.28 Programmer's Guide Integrity servers (769150-001, March 2014)

IVDEP Pragma
#pragma IVDEP
For the associated loop, this pragma directs the compiler to ignore any apparent loop dependencies
involving references to array-typed entities.
NODEPCHK Pragma
#pragma NODEPCHK
For the associated loop, this pragma directs the compiler to ignore all loop dependencies (regardless
of type) except for induction variables and some other scalar loop dependencies as determined
by the compiler implementation.
NO_RETURN Pragma
#pragma NO_RETURN function1, [function2, . . .]
The NO_RETURN pragma is anassertion to the optimizer that the named functions never return to
the call site.This allows the optimizer to delete any code after the function. A C++ function marked
with the NO_RETURN pragma may still throw an exception unless it has an emty throw list.
Diagnostic Pragmas
The following are the diagnostic pragmas supported by the HP aC++ compiler.
diag_xxx Pragmas
#pragma diag_suppress message1 message2 ...
#pragma diag_warning message1 message2 ...
#pragma diag_error message1 message2 ...
#pragma diag_default message1 message2 ...
Command-line options help you generate diagnostic messages for the entire build or for a specific
source file. The diag pragmas let you manage warnings for a specific region within a source file.
The use of #pragma diag_suppress within the source code disables generation of the specified
warning messages after the pragma in the source file. The pragma diag_defaultrestores the
default handling for the specified diagnostic messages. Similarly, diag_warning enables
generation of the specified diagnostic messages, and diag_error converts a warning to an
error.
Only diagnostics above 2000 are affected. This pragma will not affect the lower numbered
diagnostics issued by the compiler's driver program.
Refer to the HP Code Advisor documentation for additional information.
The following example disables warning #2549-D locally:
int i;
#pragma diag_suppress 2549
printf ("i = %d\n", i);
#pragma diag_default 2549
Other Pragmas
The following are additional pragmas supported on the HP aC++ compiler:
assert Pragma
#pragma assert non-zero(constant-expression )string
When the compiler encounters this directive, it evaluates the expression. If the expression is zero,
the compiler generates a message that contains the specified string and the compile-time constant
expression.
For example:
Diagnostic Pragmas 105