David> BTW, was this function the final one in the source file?
Yes.
David> There are two problems here:
David> - if a Python unhandled exception happens, the plugin reports it
David> (giving the Python traceback), and then issues a gcc error, which is
David> reported at the level of the C source code. Somehow we need to get gcc
David> to give a better location for that error: it knows which function the
David> error happened in. But it's better to fix the python script so that the
David> exception doesn't happen, of course.
Yeah, I see.
David> - when issuing the warning from the script, we have to use the
David> gcc.Location. I've tried using using that of the arguments themselves,
David> but it tends to give me the location of the call. I'm not quite sure
David> where the information is getting lost.
Sometimes GCC drops information surprisingly early. So it could just be
a GCC bug; you'd have to debug into GCC to see.
David> I'm excited that you're trying it out on gdb. Are you able to compile
David> all of gdb with the checker script?
Just about! It caught a few real bugs (mostly char** -> const char **,
but also some int -> Py_ssize_t), but I also found some plugin bugs.
Tom