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 @@ -1417,8 +1417,9 @@ class pointer_typet:public bitvector_typet
14171417inline const pointer_typet &to_pointer_type (const typet &type)
14181418{
14191419 PRECONDITION (type.id ()==ID_pointer);
1420- PRECONDITION (!type.get (ID_width).empty ());
1421- return static_cast <const pointer_typet &>(type);
1420+ const pointer_typet &ret = static_cast <const pointer_typet &>(type);
1421+ validate_type (ret);
1422+ return ret;
14221423}
14231424
14241425/* ! \copydoc to_pointer_type(const typet &)
@@ -1427,8 +1428,9 @@ inline const pointer_typet &to_pointer_type(const typet &type)
14271428inline pointer_typet &to_pointer_type (typet &type)
14281429{
14291430 PRECONDITION (type.id ()==ID_pointer);
1430- PRECONDITION (!type.get (ID_width).empty ());
1431- return static_cast <pointer_typet &>(type);
1431+ pointer_typet &ret = static_cast <pointer_typet &>(type);
1432+ validate_type (ret);
1433+ return ret;
14321434}
14331435
14341436template <>
You can’t perform that action at this time.
0 commit comments