Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 990 Bytes

c28039.md

File metadata and controls

19 lines (14 loc) · 990 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Warning C28039
Warning C28039
11/04/2016
C28039
C28039
36cd63fe-1f0a-4f1c-a40b-5d52e22f19b3

Warning C28039

The type of actual parameter 'operand' should exactly match the type 'typename'

This warning is reported when an enum formal wasn't passed a member of the enum, but may also be used for other types.

Because C permits enum types to be used interchangeably, and interchangeably with constants, it's easy to pass the wrong enum value to a function without an error.

For enum types, if the type of an enum parameter is annotated with _Enum_is_bitflag_, arithmetic is permitted on the parameter. Otherwise the parameter must be of exactly the correct type. If a constant is strictly required, warning C28137 may also apply.

This rule can be used for other parameter types as well; see the function documentation for why the types must match exactly.