https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108849
Arsen Arsenović <arsen at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arsen at gcc dot gnu.org --- Comment #1 from Arsen Arsenović <arsen at gcc dot gnu.org> --- I think that declspec is currently simply an alias to attribute, IIUC (though, I've not used or written code for w32 in many years): /* Support the __declspec keyword by turning them into attributes. Note that the current way we do this may result in a collision with predefined attributes later on. This can be solved by using one attribute, say __declspec__, and passing args to it. The problem with that approach is that args are not accumulated: each new appearance would clobber any existing args. */ if (TARGET_DECLSPEC) builtin_define ("__declspec(x)=__attribute__((x))"); GCC currently does not assign code_seg to any attribute, so perhaps it could be aliased on TARGET_DECLSPEC platforms to `section'? I'm not sure if that is correct, I've never looked at the PE spec either.