On 04/19/2016 11:47 AM, Emil Velikov wrote: > On 19 April 2016 at 19:38, Ian Romanick <i...@freedesktop.org> wrote: >> The only things in macros.h that are related and use lower case are >> likely, unlikely, unreachable, and assume. All four of those are lower >> case because they mimic keywords in some compiler. We don't need a new >> spelling (or capitalization) of a name for a thing that already has a >> name. > That's the reason for my confusion - how come the likely and friends > "mimic some compiler" while ATTRIBUTE_CONST and co. do not ? I don't > mean to inspire a ragewar/etc. just wondering about where one draws > the line. Can you please shed a light ?
What compiler has a keyword for that? In GCC (and clang?) it's a big pile of __attribute__((herpaderp)) junk, and MSVC has nothing. That was definitely true years ago when the various ATTRIBUTE_* were added. If there are compiler keywords (especially ones part of future C++XYZ or CXYZ), I would entertain patches to globally change them. There are some things in https://github.com/philipaconrad/compiler-annotations/blob/master/nota.h... but it looks like we already do the ones supported by both compilers. http://stackoverflow.com/questions/2354784/attribute-formatprintf-1-2-for-msvc suggests that we could support PRINTFLIKE for MSVC, but the syntax is completely different, and it's not common across MSVC versions. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev