[PATCH] C/C++: add fix-it hints for various missing symbols
Joseph Myers
joseph@codesourcery.com
Wed Jul 5 16:17:00 GMT 2017
On Wed, 5 Jul 2017, David Malcolm wrote:
> This error message might be better to be worded in terms of the
> syntactic thing that came before, which would yield:
>
> pr7356.c:1:2: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â
> after declaration
> a//sample
> ^
>
> or somesuch. Doing so would presumably require adding an extra param to
> c_parser_error, e.g. an enum describing the syntactic elements that go before.
>
> Does this sound worth pursuing as a followup?
Yes. When you're wording things in terms of what the syntax error comes
after rather than saying it comes before some automatically-generated
description of a token, it would be best if the caller passes the complete
message in an i18n-friendly way, rather than using concat (bug 18248).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list