On Mon, Aug 29, 2016 at 09:20:53AM -0400, Eric Gallager wrote:
> I tried this patch on my fork of gdb-binutils and got a few warnings
> from it. Would it be possible to have the caret point to the argument
> mentioned, instead of the function name? And also print the option
> name? E.g., instead of the current:
> 
> or32-opc.c: In function ‘or32_print_register’:
> or32-opc.c:956:3: warning: passing argument 1 to restrict qualified
> parameter aliases with argument 3
>    sprintf (disassembled, "%sr%d", disassembled, regnum);
>    ^~~~~~~
> 
> could it look like:
> 
> or32-opc.c: In function ‘or32_print_register’:
> or32-opc.c:956:3: warning: passing argument 1 to restrict qualified
> parameter aliases with argument 3 [-Wrestrict]
>    sprintf (disassembled, "%sr%d", disassembled, regnum);
>             ^~~~~~~~~~~~
> 
> instead?

I didn't try to implement it, but I think this should be fairly easy to
achieve in the C FE, because c_parser_postfix_expression_after_primary
has arg_loc, which is a vector of parameter locations.

        Marek

Reply via email to