How do we write unused arguments?

Bernd Schmidt bschmidt@redhat.com
Thu Nov 5 09:32:00 GMT 2015


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.


Bernd



More information about the Gcc mailing list