Topic: unused attribute (was: Add compiler time attributes
Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Wed, 30 Apr 2014 11:21:05 -0400
Raw View
On 2014-04-30 09:56, Jean-Marc Bourguet wrote:
> Le mercredi 30 avril 2014 14:59:51 UTC+2, gmis...@gmail.com a =C3=A9crit =
:
>>
>> btw. anyone think we're ready to add things like [[unused_arg]] yet?
>>
> We don't need an attribute for that, we already can avoid giving a name t=
o
> the argument.
void foo(int bar)
{
#if EXPR
report(bar)
#endif
...do some other stuff that doesn't use 'bar'...
}
Yes, this happens in real code. (Often the PP conditional is related to=20
if debugging is enabled or not.)
There's also the issue that not naming the argument makes the code=20
harder to read ("what's this argument that you don't care about?").
--=20
Matthew
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.