On Tue, Sep 15, 2015 at 11:26:03AM -0600, Martin Sebor wrote:
> On 09/15/2015 10:52 AM, Marek Polacek wrote:
> >Currently, when one writes a code that is missing the struct/union/enum
> >tag, we get less than ideal error message. The following patch improves
> >the situation a bit by giving a hint to the user.
>
> I can't count the number of times I've made this mistake and
> scratched my head wondering what I did wrong. This is going
> to help a lot!
Good ;).
> FWIW, I would like it even more if there was just one message
> instead of an error and a note. Since (when) the type is known,
> could the error simply say:
>
> error_at (here, "must use the %<struct%> keyword to refer to type %qE",
> name);
Works for me as well. Changing this is trivial -- I can change this if
people like one error message more than error + note.
Marek