4 ms·
GCC extensions in particular tend to support multiple spellings of the same keyword with different numbers of underscores, which usually do exactly the same thi
by comex 8y ago
GCC extensions in particular tend to support multiple spellings of the same keyword with different numbers of underscores, which usually do exactly the same thing. For example, you can write asm, __asm, or __asm__; typeof, __typeof, or __typeof__; __attribute or __attribute__; etc. The versions with no underscores only with with a setting of -std that includes GNU extensions, while the versions with underscores always work (because names starting with underscores are reserved by the spec).
Even alignof has __alignof and __alignof__ as two spellings of the GNU variant. But unlike with typeof, for whatever reason, plain "alignof" was never supported in C as a GNU extension; it only ever worked in C++ mode, as a standard feature from C++11. That makes it slightly less weird to create a difference. But only slightly; I'm more familiar with GCC esoterica than most people and I had no idea "alignof" was C++-exclusive until I looked it up.