widl: Array dimensions have to be constants.
This commit is contained in:
parent
0486140c3d
commit
968c8688c4
|
@ -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
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue