Everything
11.18 -merge_files

Under certain conditions, compilation with -merge_files or -whole_program specified as the translation unit of code that includes union-type variables will produce error code F0530800 or warning code W0530811.

 

[Conditions]

If all of the following conditions are satisfied, error code F0530800 or warning code W0530811 will be produced.

(1)

-merge_files or -whole_program is specified.

(2)

A union-type external variable having two or more members has been initialized outside any function, and, other than the members that have been initialized, a member has an alignment and size larger than the other member or members.

(3)

(The variable described in (2) above is declared as extern for reference by either of the following.

(3-1) Source files other than the one in which the definition of external variable described in (2) exists.

(3-2) Header files included directly or indirectly by the source files other than the one in which the definition of external variable described in (2) exists.

 

[Workarounds]

Take any of the following steps.

(1)

Specify neither of the options in condition (1).

(2)

Initialize the union-type external variable described in condition (2) within a function.

(3)

Refer to the variables corresponding to condition (2) only in the source file that includes the definition of the external variable.