On 04/19/2016 12:15 PM, Chad Versace wrote: > On Tue 19 Apr 2016, Emil Velikov wrote: >> On 19 April 2016 at 19:38, Ian Romanick <i...@freedesktop.org> wrote: >>> On 04/19/2016 07:48 AM, Emil Velikov wrote: >>>> On 18 April 2016 at 19:01, Ian Romanick <i...@freedesktop.org> wrote: >>>>> On 04/18/2016 08:06 AM, Emil Velikov wrote: >>>>>> On 18 April 2016 at 04:43, Francisco Jerez <curroje...@riseup.net> wrote: >>>>>>> Grazvydas Ignotas <nota...@gmail.com> writes: >>>>>>> >>>>>>>> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov >>>>>>>> <emil.l.veli...@gmail.com> wrote: >>>>>>>>> On 16 April 2016 at 02:00, Grazvydas Ignotas <nota...@gmail.com> >>>>>>>>> wrote: > >>>>>>>>>> +#define MAYBE_UNUSED UNUSED >>>>>>>>>> + >>>>>>>>> Hell yeah ! >>>>>>>>> >>>>>>>>> A thing that comes to mind ... a while back we've been wondering about >>>>>>>>> (re)naming these just the the way we do in the kernel. Namely >>>>>>>>> __maybe_unused in this case. Can you give that one a try and link a >>>>>>>>> branch. >>>>>>>> >>>>>>>> I hope you mean something like this? >>>>>>>> https://github.com/notaz/mesa/commits/warnings >>>>>>>> >>>>>>> >>>>>>> You guys know that in standard C any identifier (including a >>>>>>> preprocessor define) starting with double underscore is reserved for the >>>>>>> implementation and causes the program's behavior to be undefined? The >>>>>>> kernel is kind of part of the implementation so they can do whatever >>>>>>> they want, but it seems dubious to do the same in a userspace library. >>>>>>> How about you use a single (or no) underscore if people prefer the >>>>>>> lowercase spelling? >>>>>>> > > FYI, systemd uses a nice convention for attributes that is nicer on the > eyes than ALL_CAPS and doesn't violate the standard with > double-underscore. systemd declares attributes as _lower_case_. > > For example: > > #define _maybe_unused_ __attribute__((unused))
That wouldn't be terrible. If there is general support changing, we should change all of everything at once... and document the new practice. My goal previously in the thread is to explain how and why we got to where we are... and how that supports the patch as is. :) > Anyway, the original path with ALL_CAPS is > Reviewed-by: Chad Versace <chad.vers...@intel.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev