Hacker News new | ask | show | jobs
by dooglius 24 days ago
The preceding comment indicates that the intent is to support other compilers. I think a better approach is to define __glibc_attribute__ based on compiler support and to stick to that within glibc since there's no reason to think that another compiler's attributes have the same semantics as GNU C's.
1 comments

That ship sailed already. You simply have to mimic gcc.

Which is at least better than with MSVC, where they did everything differently, and only half of it.

Well in practice you have to mimic GCC except for Windows where you have to mimic MSVC.
Not really. MSVC is too broken. I just mimic x86_64-w64-mingw32-gcc, which exists everywhere.