Add some macros for __attribute__ and use it
Merge branch 'master' into 1.12