GCC Extensions
One of the constants of GNU products is a huge number of features. gcc has an incredible number of extensions available. They can help improve your code, but they can also destroy portability if you target a platform that does not have gcc or you are not using gcc on Mac OS X.
Here are a handful of interesting extensions:
long long and unsigned long long: quadword (i.e., 64-bit) integers are treated as first class citizens. You can perform basic math (+,-,*,/), modular arithmetic, and bitwise operations with them.
Complex numbers: in C++ you can create complex numbers as a first class type, but gcc C has them built in.
Variable length automatic arrays: like you can use in C++, declaring the size of a stack-based array at runtime: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access