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;
|
$$ = tmp;
|
||||||
}
|
}
|
||||||
| struct_data_type
|
| struct_data_type
|
||||||
{ $$ = $1; }
|
{ if (!$1->packed_flag) {
|
||||||
|
yyerror(@1, "sorry: Unpacked structs not supported.");
|
||||||
|
}
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
| enum_data_type
|
| enum_data_type
|
||||||
{ $$ = $1; }
|
{ $$ = $1; }
|
||||||
| atom2_type signed_unsigned_opt
|
| 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For now, can only handle packed structs.
|
// For now, can only handle packed structs. The parser generates
|
||||||
ivl_assert(*struct_type, 0);
|
// 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)
|
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