return create_invalid_expression();
}
+/**
+ * Parse a microsoft __noop expression.
+ */
+static expression_t *parse_noop_expression(void) {
+ source_position_t source_position = HERE;
+ eat(T___noop);
+
+ if (token.type == '(') {
+ /* parse arguments */
+ eat('(');
+ add_anchor_token(')');
+ add_anchor_token(',');
+
+ if(token.type != ')') {
+ while(true) {
+ (void)parse_assignment_expression();
+ if(token.type != ',')
+ break;
+ next_token();
+ }
+ }
+ }
+ rem_anchor_token(',');
+ rem_anchor_token(')');
+ expect(')');
+
+ /* the result is a (int)0 */
+ expression_t *cnst = allocate_expression_zero(EXPR_CONST);
+ cnst->base.source_position = source_position;
+ cnst->base.type = type_int;
+ cnst->conste.v.int_value = 0;
+
+ return cnst;
+
+end_error:
+ return create_invalid_expression();
+}
+
/**
* Parses a primary expression.
*/
case T__assume: return parse_assume();
case '(': return parse_brace_expression();
+ case T___noop: return parse_noop_expression();
}
errorf(HERE, "unexpected token %K, expected an expression", &token);
S(_ALL, while)
S(_C99|_GNUC, _Bool)
-S(_C99|_GNUC, _Complex)
-S(_C99|_GNUC, _Imaginary)
S(_GNUC, __thread)
S(_GNUC, __extension__)
S(_GNUC, __builtin_classify_type)
S(_MS, __FUNCDNAME__)
#undef S
+T(_C99|_GNUC, _Complex, "_Complex",)
+T(_GNUC, __complex__, "__complex__", = T__Complex)
+T(_GNUC, __complex, "__complex", = T__Complex)
+T(_C99|_GNUC, _Imaginary, "_Imaginary",)
T(_GNUC, __real__, "__real__",)
T(_GNUC, __real, "__real", = T___real__)
T(_GNUC, __imag__, "__imag__",)
T(_MS, __declspec, "__declspec", = T__declspec)
T(_MS, _based, "_based",)
T(_MS, __based, "__based", = T__based)
+T(_MS, __noop, "__noop",)
T(_MS, __ptr32, "__ptr32",)
T(_MS, __ptr64, "__ptr64",)