Re: Using C2x attributes more effectively in Gnulib

2021-08-22 Thread Bruno Haible
Paul Eggert wrote: > >> Also, draft C2x lets one write the above function without naming the > >> parameters, as follows: > >> > >> SE_SELINUX_INLINE int > >> fsetfilecon (int, char const *) > >> { errno = ENOTSUP; return -1; } > >> > >> This is nicer than [[maybe_unused]], because it

Re: Using C2x attributes more effectively in Gnulib

2021-08-09 Thread Paul Eggert
On 8/7/21 6:40 PM, Bruno Haible wrote: Also, draft C2x lets one write the above function without naming the parameters, as follows: SE_SELINUX_INLINE int fsetfilecon (int, char const *) { errno = ENOTSUP; return -1; } This is nicer than [[maybe_unused]], because it says the argum

Re: Using C2x attributes more effectively in Gnulib

2021-08-07 Thread Bruno Haible
Hi Paul, > Because draft C2x requires using [[maybe_unused]] before a parameter > instead of after, the recent C2x-related changes to Gnulib caused me to > move all uses of _GL_UNUSED_PARAMETER Agreed. We should follow standards. The new standard picked a different position for the marker than

Using C2x attributes more effectively in Gnulib

2021-07-31 Thread Paul Eggert
Because draft C2x requires using [[maybe_unused]] before a parameter instead of after, the recent C2x-related changes to Gnulib caused me to move all uses of _GL_UNUSED_PARAMETER; and while I was at it I changed it to _GL_ATTRIBUTE_MAYBE_UNUSED FILE thus removing a dependency on the snippet/unu