2 ms·
The ABI for a specific platform will define how bit fields are arranged in memory, or at least you can always rely on GCC to not change behaviour. They work per
by Asooka 4y ago
The ABI for a specific platform will define how bit fields are arranged in memory, or at least you can always rely on GCC to not change behaviour. They work perfectly well for data in memory, at work we use them all the time for storing tiny integers or flags.
- ncmncm 4y agoThey work on the machines where you have tested them. The ABI defines what is supposed to happen, not what will happen. Gcc will get it right on very heavily used archs, and very heavily used archs will generally execute the instructions right. If your code only ever runs on the physical machines where you test, or only on very mainstream chip designs, then fine. You have been warned. Now it is on you.