https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81224
--- Comment #18 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #17)
> (In reply to Martin Liška from comment #16)
> > --- a/gcc/c-family/c-common.c
> > +++ b/gcc/c-family/c-common.c
> > @@ -9447,7 +9447,6 @@ handle_target_attribute (tree *node, tree name, tree
> > args, int flags,
> > && TREE_STRING_LENGTH (value) == 1
> > && TREE_STRING_POINTER (value)[0] == '\0')
> > {
> > - warning (OPT_Wattributes, "empty string in attribute %<target%>");
> > *no_add_attrs = true;
> > }
> > }
> >
> > That will however skip entire attribute:
> > __attribute__((target("sse4.2", "", "")))
> >
> > Or I can do patch that will just remove empty strings in a TREE_LIST.
> > What way do you prefer?
>
> Something that doesn't change behavior. So the latter is better than the
> former, but I wonder if just some return or continue when seeing empty
> string later on isn't even easier/safer.
Well, for this purpose, maybe the original patch can be handy:
https://patchwork.ozlabs.org/patch/794801/ ?