File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1389,8 +1389,9 @@ class pointer_typet:public bitvector_typet
1389
1389
inline const pointer_typet &to_pointer_type (const typet &type)
1390
1390
{
1391
1391
PRECONDITION (type.id ()==ID_pointer);
1392
- PRECONDITION (!type.get (ID_width).empty ());
1393
- return static_cast <const pointer_typet &>(type);
1392
+ const pointer_typet &ret = static_cast <const pointer_typet &>(type);
1393
+ validate_type (ret);
1394
+ return ret;
1394
1395
}
1395
1396
1396
1397
/* ! \copydoc to_pointer_type(const typet &)
@@ -1399,8 +1400,9 @@ inline const pointer_typet &to_pointer_type(const typet &type)
1399
1400
inline pointer_typet &to_pointer_type (typet &type)
1400
1401
{
1401
1402
PRECONDITION (type.id ()==ID_pointer);
1402
- PRECONDITION (!type.get (ID_width).empty ());
1403
- return static_cast <pointer_typet &>(type);
1403
+ pointer_typet &ret = static_cast <pointer_typet &>(type);
1404
+ validate_type (ret);
1405
+ return ret;
1404
1406
}
1405
1407
1406
1408
template <> inline bool can_cast_type<pointer_typet>(const typet &type)
You can’t perform that action at this time.
0 commit comments