On 10/5/2021 9:03 AM, Jan-Benedict Glaw wrote:
Hi Jeff,

On Tue, 2021-10-05 08:53:00 -0600, Jeff Law <jeffreya...@gmail.com> wrote:
On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote:
On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw <jbg...@lug-owl.de> wrote:
gcc/ChangeLog:

        * common/config/avr/avr-common.c (avr_handle_option): Mark
        argument as ATTRIBUTE_UNUSED.

diff --git a/gcc/common/config/avr/avr-common.c 
b/gcc/common/config/avr/avr-common.c
index 6486659d27c..a6939ad03d3 100644
--- a/gcc/common/config/avr/avr-common.c
+++ b/gcc/common/config/avr/avr-common.c
@@ -77,7 +77,8 @@ static const struct default_options 
avr_option_optimization_table[] =
   static bool
   avr_handle_option (struct gcc_options *opts, struct gcc_options*,
-                   const struct cl_decoded_option *decoded, location_t loc)
+                   const struct cl_decoded_option *decoded,
+                   location_t loc ATTRIBUTE_UNUSED)
   {
     int value = decoded->value;


    Ok for trunk?
Wanted to give this a ping.
I thought I sent a reply a few days ago.  Instead of using ATTRIBUTE_UNUSED,
just drop the parameter's name.  You should consider that pre-approved for
this and any other cases you run into.
Not quite I think. The `loc`ation parameter is used under some
circumstances, though it's dependant on some #ifdefs:
Sigh.  We rooted out most of those kinds of conditional compilation from the core compiler years ago for precisely these kinds of reasons.  Go ahead with the ATTRIBUTE_UNUSED in this case.  But generally dropping the argument's name is better.  Extra points if you killed the conditional compilation in the avr backend, but I don't think that should be a requirement to move forward.

Jeff

Reply via email to