Tag

fshort-enums

1 views collected around this technical thread.

IT Services Circle
IT Services Circle
Mar 20, 2022 · Fundamentals

Understanding Enum Size and Compiler Options in C (gcc)

This article examines how the memory size of C enum types varies with declared value ranges and compiler options such as -fshort-enums, showing default and shortened sizes across different compilers and illustrating the impact of adding larger constant values.

C++compilerembedded
0 likes · 4 min read
Understanding Enum Size and Compiler Options in C (gcc)