Commit 968c8688 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Array dimensions have to be constants.

parent 0486140c
......@@ -157,7 +157,7 @@ cpp_quote("#endif")
int sum_cs(cs_t *cs);
int sum_cps(cps_t *cps);
int sum_cpsc(cpsc_t *cpsc);
int sum_complex_array(int n, refpint_t pi[n]);
int sum_complex_array(int n, [size_is(n)] refpint_t pi[]);
typedef [wire_marshal(int)] void *puint_t;
int square_puint(puint_t p);
......
......@@ -452,8 +452,12 @@ arg: attributes decl_spec m_any_declarator { if ($2->stgclass != STG_NONE && $
}
;
array: '[' m_expr ']' { $$ = $2; }
array: '[' expr ']' { $$ = $2;
if (!$$->is_const)
error_loc("array dimension is not an integer constant\n");
}
| '[' '*' ']' { $$ = make_expr(EXPR_VOID); }
| '[' ']' { $$ = make_expr(EXPR_VOID); }
;
m_attributes: { $$ = NULL; }
......@@ -638,16 +642,6 @@ m_exprs: m_expr { $$ = append_expr( NULL, $1 );
| m_exprs ',' m_expr { $$ = append_expr( $1, $3 ); }
;
/*
exprs: { $$ = make_expr(EXPR_VOID); }
| expr_list
;
expr_list: expr
| expr_list ',' expr { LINK($3, $1); $$ = $3; }
;
*/
m_expr: { $$ = make_expr(EXPR_VOID); }
| expr
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment