Fail gracefully when an unpacked struct is declared.
This commit is contained in:
parent
578a2543f7
commit
71b1546a7d
6
parse.y
6
parse.y
|
|
@ -1044,7 +1044,11 @@ data_type /* IEEE1800-2005: A.2.2.1 */
|
|||
$$ = tmp;
|
||||
}
|
||||
| struct_data_type
|
||||
{ $$ = $1; }
|
||||
{ if (!$1->packed_flag) {
|
||||
yyerror(@1, "sorry: Unpacked structs not supported.");
|
||||
}
|
||||
$$ = $1;
|
||||
}
|
||||
| enum_data_type
|
||||
{ $$ = $1; }
|
||||
| atom2_type signed_unsigned_opt
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ static void pform_set_struct_type(struct_type_t*struct_type, perm_string name, N
|
|||
return;
|
||||
}
|
||||
|
||||
// For now, can only handle packed structs.
|
||||
ivl_assert(*struct_type, 0);
|
||||
// For now, can only handle packed structs. The parser generates
|
||||
// a "sorry" message, so no need to do anything here.
|
||||
}
|
||||
|
||||
void pform_set_struct_type(struct_type_t*struct_type, list<perm_string>*names, NetNet::Type net_type, list<named_pexpr_t>*attr)
|
||||
|
|
|
|||
Loading…
Reference in New Issue