如果应用程序仅针对 armv7 和 armv7 编译,则在 arm64 设备上运行时,它使用什么大小的数据类型

If app is compiled only for armv7 and armv7s, what size data types does it use when running on an arm64 device?

本文关键字:armv7 数据类型 运行时 什么 应用程序 编译 如果 arm64 则在      更新时间:2023-10-16

我已经将Xcode中的"架构"设置设置为armv7,armv7s。

当我在 arm64 设备(如 iPhone5s)上运行我的应用程序时会发生什么。

long的大小是 64 位还是 32 位?

编译器创建 32 位或 64 位代码,具体取决于所选体系结构。

因此,如果应用针对 32 位体系结构(如 armv7、armv7s)进行编译,long的大小为 32 位,与代码的实际设备无关继续运行。