HP C A.06.05 Reference Manual

Data Types and Declarations
Compound Literal
Chapter 3 69
This example is for structure objects created using compound literals, which are passed to
functions.
Example 3-9 Example 9: Possible Ways of Using Compound Literals
int x = (int){5}; // initializing x with 5
int *y = (int *){&x}; // initializing y with address of x
The purpose of the above example is only to show the other possible ways of using compound
literals.
NOTE Compound literal is recognized only in the C99 mode (-AC99).