Re: [PATCH 2/3] vec: Silence -Wunused-function warnings on clang

Pedro Alves
2017-06-26T12:47:45Z

On 06/26/2017 01:28 PM, Simon Marchi wrote:

> I wanted to keep it simple and easy to understand, so I didn't want to
> add to many layers of definitions. I thought that even if we ignored
> -Wunused-function in the vector macro expansions when compiling with
> GCC, it wasn't a big deal.

That's another option (and I think it should be fine, with a comment),
but it wasn't what the patch was doing, so you'd be leaving deciding
whether that's fine to whoever comes next and wants to make
DIAGNOSTICS_IGNORE_UNUSED_FUNCTION on gcc. IMO, that's a form of
technical dept that we should avoid.

The point here I'm trying to convey is: avoid letting the specifics
of users of the DIAGNOSTICS_IGNORE users bleed into the conditionals
that are used to define the macros in diagnostics.h. At least
for the macros that map directly to the warning name.

> But 2.2 is fine with me, I'll try it. It's
> all temporary anyway (famous last words), since the days of vec.h are
> counted :).

True. :-)

Thanks,
Pedro Alves