Upraviť

Zdieľať cez


/Zc:checkGwOdr (Enforce Standard C++ ODR violations under /Gw)

This switch enforces C++ standards conformance when using /Gw (Optimize global data). When using /Gw, certain One Definition Rule (ODR) violations are ignored. This flag ensures that the appropriate errors are raised.

Syntax

/Zc:checkGwOdr[-]

Remarks

This switch is off by default.

To see an example of ODR violations that are ignored when using /Gw, see Standards conformance improvements to /Gw.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Command Line property page.

  3. Modify the Additional Options property to include /Zc:checkGwOdr or /Zc:checkGwOdr- and then choose OK.

See also

/Zc (Conformance)
One Definition Rule (ODR)
Standards conformance improvements to /Gw