This is the mail archive of the
mailing list for the GCC project.
Re: How do we write unused arguments?
- From: Jeff Law <law at redhat dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 5 Nov 2015 06:59:29 -0700
- Subject: Re: How do we write unused arguments?
- Authentication-results: sourceware.org; auth=none
- References: <563B221B dot 9070806 at redhat dot com>
On 11/05/2015 02:32 AM, Bernd Schmidt wrote:
I think we should move to the 3rd form when possible. I didn't even
know the language supported unnamed arguments in this way until recently :-)
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.
Bringing some consistency to this will be nice.