AGGREGATE | NOAGGREGATE (C only)

Category

Listings, messages, and compiler information

Pragma equivalent

#pragma options (aggregate) (C only), #pragma options (noaggregate) (C only)

Purpose

Lists structures and unions, and their sizes.

Syntax

Read syntax diagramSkip visual syntax diagramNOAGGREGATEAGGREGATE(OFFSETDECOFFSETHEX)

Defaults

NOAGGREGATE

For the z/OS® UNIX System Services utilities, the default for a regular compile is NOAGGREGATE. To specify AGGREGATE, you must specify -V.

For AGGREGATE, the default is OFFSETDEC.

Parameters

OFFSETDEC
Lists the structure member offsets in decimal format.
OFFSETHEX
Lists the structure member offsets in hexadecimal format.

Usage

Specifying AGGREGATE with no suboption is equivalent to specifying AGGREGATE(OFFSETDEC).

When the AGGREGATE compiler option is in effect, the compiler includes a layout of all struct or union types in the compiler listing.

Depending on the struct or union declaration, the maps are generated as follows:
  • If the typedef name refers to a struct or union, one map is generated for the struct or union for which the typedef name refers to. If the typedef name can be qualified with the _Packed keyword, then a packed layout of the struct or union is generated as well. Each layout map contains the offset and lengths of the structure members and the union members. The layout map is identified by the struct/union tag name (if one exists) and by the typedef names.
  • If the struct or union declaration has a tag, two maps are created: one contains the unpacked layout, and the other contains the packed layout. The layout map is identified by the struct/union tag name.
  • If the struct or union declaration does not have a tag, one map is generated for the struct or union declared. The layout map is identified by the variable name that is specified on the struct or union declaration.

Predefined macros

None.