davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
199 stars 58 forks source link

ugly error message #52

Open davidmalcolm opened 7 years ago

davidmalcolm commented 7 years ago

When compiling gdb with gcc-with-cpychecker, I see some errors like this:

../../src/gdb/tui/tui-stack.c:421:32: warning: passing uninitialized data as argument 4 to function: gcc.VarDecl('a') at ../../src/gdb/tui/tui-stack.c:421 [enabled by default]

I don't think I should ever see 'gcc.VarDecl' in an error message; instead, I think it should refer to the variable name used in the source.

davidmalcolm commented 7 years ago

Imported from trac issue 12. Created by tromey on 2012-01-04T15:10:26, last modified: 2012-01-09T18:44:29

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-01-09 18:40:06:

I've revamped this within b0afdbe1550db6cac5ee61ff3395864de2883d59, though some issues remain (see the commit message)

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-01-09 18:44:29:

FWIW, with that commit I now get

../../src/gdb/tui/tui-stack.c:425:34: error: passing uninitialized data (a) as argument 1 to function at ../../src/gdb/tui/tui-stack.c:425 [-Werror]

for the message you initially reported, so the error message looks OK now.

That said, it looks like a false positive; file another ticket if you want me to look into it.