This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add "fast" conversions from arrays to bitmaps
Martin Liška <mliska@suse.cz> writes:
>> +··static·size_t·size·(const·T·(&x)[N])·{·return·N;·}
>
> Hello.
>
> This leads to a clang warning:
>
> gcc/array-traits.h:45:33: warning: unused parameter 'x' [-Wunused-parameter]
>
> Can you please fix it?
> Thanks,
> Martin
Sure, done as follows, committed as r275805.
2019-09-17 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* array-traits.h (array_traits<T[N]>::size): Remove parameter name.
Index: gcc/array-traits.h
===================================================================
--- gcc/array-traits.h 2019-09-09 19:01:40.367078300 +0100
+++ gcc/array-traits.h 2019-09-17 15:27:38.537865469 +0100
@@ -42,7 +42,7 @@ struct array_traits<T[N]>
static const bool has_constant_size = true;
static const size_t constant_size = N;
static const T *base (const T (&x)[N]) { return x; }
- static size_t size (const T (&x)[N]) { return N; }
+ static size_t size (const T (&)[N]) { return N; }
};
#endif