This article applies to the Oracle Developer Studio (previously known as Oracle Solaris Studio) compilers. The principal cause of problems when converting 32-bit applications to 64-bit applications is the change in size of the
int
type with respect to the long
and pointer types. When converting 32-bit programs to 64-bit programs, only long
types and pointer types change in size from 32 bits to 64 bits; integers of type int
stay at 32 bits in size. This can cause trouble with data truncation when assigning pointer or long
types to int
types. Also, problems with sign extension can occur when assigning expressions using types shorter than the size of an int
to an unsigned long
or a pointer. This article discusses how to avoid or eliminate these problems.Open any Office application, such as Word or Excel. Showing the full version number and bit version (32-bit or 64-bit). In the example below, the version number is 16.18 and the license is a one-time purchase of Office 2019 for Mac. Update history for Office for Mac. Apps flagged as 32-bit in the RoaringApps database are listed below. Before upgrading to macOS Catalina, check to see if any of the apps you use regularly are in the list. You can also use the Go64 application to scan your Mac and see which applications are 32-bit, and which are still using a. Apple offer Pages, Numbers and Keynotes, which are essentially their version of Word, Excel and PowerPoint for free in the app store. If you're in a bind and need these programs but can't pay for them, maybe check out the free alternatives.
![Bit Bit](/uploads/1/2/6/3/126359512/449236069.png)
Consider the Differences Between the 32-bit and 64-bit Data Models
The biggest difference between the 32-bit and the 64-bit compilation environments is the change in on the previous line. This is useful when you want lint to ignore certain lines of code such as casts and assignments. Exercise extreme care when you use the
'NOTE(LINTED(<optional message>))'
comment because it can mask real problems. When you use NOTE
, also include #include<note.h>
. Refer to the lint man
page for more information.Check for Changes of Pointer Size With Respect to the Size of Plain Integers
Since plain integers and pointers are the same size in the ILP32 compilation environment, 32-bit code commonly relies on this assumption. Pointers are often cast to
int
or unsigned int
for address arithmetic. You can cast your pointers to unsigned long
because long
and pointer types are the same size in both ILP32 and LP64 data-type models. However, rather than explicitly using unsigned long
, use uintptr_t
instead because it expresses your intent more closely and makes the code more portable, insulating it against future changes. To use the uintptr_t
and intptr_t
you need to #include <inttypes.h>
.Sep 14, 2019 However with the release of Mac OS 10.15 later this year, no 32 bit apps will work. To avoid issues, you could leave your computer at it’s existing Operating System. If you do decide to upgrade, you will need to determine which app is not compatible, and check with the developer of that app to see if they have, or have plans of providing a 64.
Consider the following example:
The following version will function correctly when compiled to both 32-bit and 64-bit targets:
Check for Changes in Size of Long Integers With Respect to the Size of Plain Integers
Because integers and longs are never really distinguished in the ILP32 data-type model, your existing code probably uses them indiscriminately. Modify any code that uses integers and longs interchangeably so it conforms to the requirements of both the ILP32 and LP64 data-type models. While an integer and a long are both 32-bits in the ILP32 data-type model, a long is 64 bits in the LP64 data-type model.
Consider the following example:
Check for Sign Extensions
Sign extension is a common problem when you convert to the 64-bit compilation environment because the type conversion and promotion rules are somewhat obscure. To prevent sign-extension problems, use explicit casting to achieve the intended results.
To understand why sign extension occurs, it helps to understand the conversion rules for ISO C. The conversion rules that seem to cause the most sign extension problems between the 32-bit and the 64-bit compilation environment come into effect during the following operations:
- Integral promotionYou can use a char, short, enumerated type, or bit-field, whether signed or unsigned, in any expression that calls for an integer. If an integer can hold all possible values of the original type, the value is converted to an integer; otherwise, the value is converted to an unsigned integer.
- Conversion between signed and unsigned integersWhen an integer with a negative sign is promoted to an unsigned integer of the same or larger type, it is first promoted to the signed equivalent of the larger type, then converted to the unsigned value.
When the following example is compiled as a 64-bit program, the addr variable becomes sign-extended, even though both addr and a.base are unsigned types.
This sign extension occurs because the conversion rules are applied as follows:
The structure member a.base
is converted from anunsigned int
bit field to anint
because of the integral promotion rule. In other words, because the unsigned 19-bit field fits within a 32-bit integer, the bit field is promoted to an integer rather than an unsigned integer. Thus, the expressiona.base << 13
is of typeint
. If the result were assigned to anunsigned int
, this would not matter because no sign extension has yet occurred.- The expression
a.base << 13
is of typeint
, but it is converted to along
and then to anunsigned long
before being assigned toaddr
, because of signed and unsigned integer promotion rules. The sign extension occurs when performing theint
tolong
conversion.
Thus, when compiled as a 64-bit program, the result is as follows:
When compiled as a 32-bit program, the size of an unsigned long
is the same as the size of an int
, so there is no sign extension.Check Structure Packing
Check the internal data structures in an applications for holes; that is, extra padding appearing between fields in the structure to meet alignment requirements. This extra padding is allocated when
long
or pointer fields grow to 64 bits for the LP64 data-type model, and appear after an int
that remains at 32 bits in size. Since long
and pointer types are 64-bit aligned in the LP64 data-type model, padding appears between the int
and long
or pointer type. In the following example, member p
is 64-bit aligned, and so padding appears between the member k
and member p
. Also, structures are aligned to the size of the largest member within them. Thus, in the above structure, padding appears between member
i
and member j
.When you repack a structure, follow the simple rule of moving the long and pointer fields to the beginning of the structure. Consider the following structure definition:
Mac 32 Bit App Data Trapped Full
Check for Unbalanced Size of Union Members
Be sure to check the members of unions because their fields can change size between the ILP32 and the LP64 data-type models, making the size of the members different. In the following union, member
_d
and member array _l
are the same size in the ILP32 model, but different in the LP64 model because long
types grow to 64 bits in the LP64 model, but double
types do not. The size of the members can be rebalanced by changing the type of the
_l
array member from type long
to type int
.Make Sure Constant Types are Used in Constant Expressions
A lack of precision can cause the loss of data in some constant expressions. Be explicit when you specify the data types in your constant expression. Specify the type of each integer constant by adding some combination of {
u,U,l,L
}. You can also use casts to specify the type of a constant expression. Consider the following example: The above code can be made to work as intended, by appending the type to the constant,
1
, as follows:Check Format String Conversions
Make sure the format strings for
printf
(3S), sprintf
(3S), scanf
(3S), and sscanf
(3S) can accommodate long or pointer arguments. For pointer arguments, the conversion operation given in the format string should be %p
to work in both the 32-bit and 64-bit compilation environments. For long
arguments, the long size specification, l
, should be prepended to the conversion operation character in the format string.Also, check to be sure that buffers passed to the first argument in
sprintf
contain enough storage to accommodate the expanded number of digits used to convey long and pointer values. For example, a pointer is expressed by 8 hex digits in the ILP32 data model but expands to 16 in the LP64 data model.Type Returned by sizeof()
Operator is an unsigned long
In the LP64 data-type model,
sizeof()
has the effective type of an unsigned long
. If sizeof()
is passed to a function expecting an argument of type int
, or assigned or cast to an int
, the truncation could cause a loss of data. This is only likely to be problematic in large database programs containing extremely long arrays.Use Portable Data Types or Fixed Integer Types for Binary Interface Data
32 Or 64 Bit Mac
For data structures that are shared between 32-bit and 64-bit versions of an application, stick with data types that have a common size between ILP32 and LP64 programs. Avoid using
long
data types and pointers. Also, avoid using derived data types that change in size between 32-bit and 64-bit applications. For example, the following types defined in <sys/types.h>
change in size between the ILP32 and LP64 data models:clock_t
, which represents the system time in clock ticksdev_t
, which is used for device numbersoff_t
, which is used for file sizes and offsetsptrdiff_t
, which is the signed integral type for the result of subtracting two pointerssize_t
, which reflects the size, in bytes, of objects in memoryssize_t
, which is used by functions that return a count of bytes or an error indicationtime_t
, which counts time in seconds
Using the derived data types in
<sys/types.h>
is a good idea for internal data, because it helps to insulate the code from data-model changes. However, preccisely because the size of these types are prone to change with the data model, using them is not recommended in data that is shared between 32-bit and 64-bit applications, or in other situations where the data size must remain fixed. Nevertheless, as with the sizeof() operator discussed above, before making any changes to the code, consider whether the loss of precision will actually have any practical impact on the program.![Bit Bit](/uploads/1/2/6/3/126359512/243826796.png)
For binary interface data, consider using the fixed-width integer types in <inttypes.h>. These types are good for explicit binary representations of the following:
- Binary interface specifications
- On-disk data
- Over the data wire
- Hardware registers
- Binary data structures
Check for Side Effects
Be aware that a type change in one area can result in an unexpected 64-bit conversion in another area. For example, check all the callers of a function that previously returned an
int
and now returns an ssize_t
.Consider the Effect of long
Arrays on Performance
Large arrays of
long
or unsigned long
types, can cause serious performance degradation in the LP64 data-type model as compared to arrays of int
or unsigned int
types. Large arrays of long
types cause significantly more cache misses and consume more memory. Therefore, if int
works just as well as long
for the application purposes, it's better to use int
rather than long
. This is also an argument for using arrays of int
types instead of arrays of pointers. Some C applications suffer from serious performance degradation after conversion to the LP64 data-type model because they rely on many, large, arrays of pointers.When macOS Mojave was announced, Apple warned that it would be the last version of macOS that would support older 32-bit apps. Apple has been phasing out 32-bit apps for the last 10 years and is now ready to take the final step, even if Mac users may not be ready to lose access to older apps.
With the release of macOS Catalina, 32-bit app support is no longer available, which means many of your older apps will no longer work if they haven't been updated to 64-bit.
32-bit vs. 64-bit
32-bit apps date back to a time when there were 32-bit processors and 32-bit operating systems, but are now outdated. Apple has long since transitioned to 64-bit processors and macOS has been 64-bit since the launch of Snow Leopard in 2009.
Compared to 32-bit apps, 64-bit apps can take advantage of more memory and offer faster system performance. Apple technologies like Metal only work with 64-bit apps, and for Apple to ensure that Mac apps include all of the latest advancements and optimizations, support for 32-bit needs to end. In the simplest terms, 32-bit apps are inefficient.
32-bit apps can run on a 64-bit system as they've been doing for years, but Apple wants to get rid of outdated apps to make sure everything that runs on the Mac is properly optimized and isn't an unnecessary drain on system resources.
Previous Warnings
Apple started warning Mac users about plans to end support for 32-bit apps back with macOS High Sierra. In High Sierra, users started getting warnings about a 32-bit app's future incompatibility with macOS.
A similar message was available in macOS Mojave, and if you opened up a 32-bit app while running Mojave, you saw an alert letting you know a specific app wouldn't work with future versions of macOS unless it was updated.
Alerts re-appeared every 30 days when launching an app, with Apple aiming to make sure customers would not be caught unaware when a 32-bit app stopped working in the future, so you should already know if one of your frequently used apps hasn't been upgraded to 64-bit.
Upon updating to macOS Catalina, you'll be shown a list of 32-bit apps that no longer work on your system.
How to Check if an App is 32-Bit or 64-Bit in macOS Mojave
To determine whether an app is 64-bit or 32-bit and to see if there are 32-bit apps installed on your machine before upgrading to macOS Catalina, follow these steps:
- Click the Apple symbol () in the menu bar on your Mac's desktop.
- Click on About This Mac.
- Choose 'System Report' at the bottom of the window.
- Scroll down to the Software list on the sidebar.
- Select Legacy Software.'
Anything in the list of Legacy Software applications is a 32-bit app and will not work when upgrading to macOS Catalina.
If Legacy Software isn't an option in the sidebar, select the Applications option and then check the list of apps at the right. The column that's labeled 64-bit will show a 'No' listing for apps that are 32-bit.
How to Prepare to Update to macOS Catalina
The first step is to make sure there aren't already available updates for apps that you have on your system, which you can generally do by updating through the Mac App Store for Mac App Store apps.
Apps outside of the Mac App Store use other update methods that can vary by app, but for many, you can click on the app's name in the menu bar and choose the 'Check for Updates' option. Some other apps have more hidden update methods, so if you do have a 32-bit app, make sure to Google how to update it to be sure there's not already new software available.
After ensuring you've updated everything you're able to update, you can contact developers and ask them to update their apps, but if that doesn't pan out, the only other solution is to start the search for an alternative app if you're committed to upgrading to macOS Catalina or have already done so.
32-Bit App Warnings When Installing Catalina
Mac 32 Bit Support
When upgrading to macOS Catalina, the installer will show a list of recently used apps that are 32-bit so you know what to expect before installing.
After viewing this list, you can choose to either cancel or continue with the installation.
macOS Catalina also shows a stop symbol over the icon of 32-bit apps in the Finder, so you know that the app isn't going to open.
Aperture
With the release of macOS Catalina, Aperture is going to stop working. Apple warned Aperture users in April 2019 that the software won't run in future versions of macOS, starting with macOS Catalina.
Apple 32 Bit Apps
If you're an Aperture user, you'll have to transition to alternate photo editing and management software, such as Adobe's Lightroom. Aperture is not 32-bit, but Apple is phasing it out all the same.
Affected Media Formats
Certain media files that use older formats and codecs are also not compatible with macOS after macOS Mojave due to the 64-bit transition, and you will need to convert some iMovie and Final Cut Pro X libraries. Incompatible media files were created using codecs that rely on QuickTime 7, and while macOS Mojave has QuickTime 7 frameworks, future versions of macOS will not.
Apple has a full list of media formats that are going to be affected by the transition available in a support document.
Continuing to Use 32-Bit Apps
In macOS Mojave and earlier versions of macOS like High Sierra, you can continue to use your 32-bit apps. If you have a 32-bit app that you absolutely depend on, you're going to want to think twice before upgrading to macOS Catalina.
Guide Feedback
Have questions about the end of support for 32-bit apps or want to offer feedback on this guide? Send us an email here.