This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do we write unused arguments?


On Thu, Nov 5, 2015 at 9:32 AM, Bernd Schmidt <bschmidt@redhat.com> wrote:
> When reviewing patches I'm never quite sure which of the following we should
> be using:
>
> some_target_hook (tree decl, machine_mode mode ATTRIBUTE_UNUSED)
>
> some_target_hook (tree decl, machine_mode ARG_UNUSED (mode))
>
> some_target_hook (tree decl, machine_mode /* mode */)
>
> some_target_hook (tree decl, machine_mode)
>
> Any opinions? I'm leaning towards the last version since it's idiomatic in
> the language we're using and has the least amount of visual clutter. If no
> one comments, I'll start enforcing that in patch reviews. Currently no one
> seems sure and everything is getting totally inconsistent.

When I asked on IRC the other day it sounded like people were tending towards

some_target_hook (tree decl, machine_mode)

and that's what I'm starting to use personally these days.


regards
Ramana


>
>
> Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]