diff --git a/parse.y b/parse.y index 948437000..787f409cb 100644 --- a/parse.y +++ b/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 diff --git a/pform_struct_type.cc b/pform_struct_type.cc index 766fc77e3..433e66a91 100644 --- a/pform_struct_type.cc +++ b/pform_struct_type.cc @@ -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*names, NetNet::Type net_type, list*attr)