struct const_expression_t {
expression_base_t base;
union {
- long long int_value;
- long double float_value;
- string_t character;
- wide_string_t wide_character;
+ long long int_value;
+ long double float_value;
+ string_t character;
+ wide_string_t wide_character;
} v;
+ bool is_ms_noop; /**< True, if this constant is the result
+ of an microsoft __noop operator */
};
struct string_literal_expression_t {
cnst->base.source_position = source_position;
cnst->base.type = type_int;
cnst->conste.v.int_value = 0;
+ cnst->conste.is_ms_noop = true;
return cnst;
case EXPR_UNKNOWN: break;
case EXPR_INVALID: return true; /* do NOT warn */
case EXPR_REFERENCE: return false;
- case EXPR_CONST: return false;
+ /* suppress the warning for microsoft __noop operations */
+ case EXPR_CONST: return expr->conste.is_ms_noop;
case EXPR_CHARACTER_CONSTANT: return false;
case EXPR_WIDE_CHARACTER_CONSTANT: return false;
case EXPR_STRING_LITERAL: return false;