For an existing code written with data-model LP32, what could be the best way to deal with the change of the Data-Model from LP32 to ILP32.
In data-model LP32: long and pointer are 32 bits, int and short are 16 bits. While in ILP32: int, long and pointer size is 32 bits.
What could be the problems that may arise when an LP32 based application code is ported to an ILP32 based system.
I think the only impact would be because of the int size changing from 16 to 32 bits. So, all the external touch points of the application may potentially get affected e.g. File access, IPCs, DataBase access, external library access....
In order to deal with this:
Use a script to convert all int declarations to short. This would retain the intended bit size of variables. But how effective would it be while dealing with external library references??? Some library functions expecting an int on a LP32 based system expected only 16 bits but on ILP32 they would expect 32 bits. What other problems could be there in this approach?
Is compile-and-see-what-happens only strategy for this??? Any thoughts in this area would be very helpful.