* [pushed 0/2] Fix test-cp-name-parser build
@ 2019-03-12 17:03 Pedro Alves
2019-03-12 17:03 ` [pushed 1/2] Fix test-cp-name-parser build, unused variable Pedro Alves
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Pedro Alves @ 2019-03-12 17:03 UTC (permalink / raw)
To: gdb-patches
This mini series fixes the test-cp-name-parser build.
I'm pondering what could we do to avoid these kinds of regressions.
We could make the buildbot always build these utilities too. Maybe
even better, add some testsuite testcase that smoke-tests
test-cp-name-parser.
Pedro Alves (2):
Fix test-cp-name-parser build, unused variable
Fix test-cp-name-parser build, parser_fprintf undefined
gdb/ChangeLog | 8 ++++++++
gdb/cp-name-parser.y | 1 -
gdb/yy-remap.h | 4 +++-
3 files changed, 11 insertions(+), 2 deletions(-)
--
2.14.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [pushed 1/2] Fix test-cp-name-parser build, unused variable 2019-03-12 17:03 [pushed 0/2] Fix test-cp-name-parser build Pedro Alves @ 2019-03-12 17:03 ` Pedro Alves 2019-03-12 17:03 ` [pushed 2/2] Fix test-cp-name-parser build, parser_fprintf undefined Pedro Alves 2019-03-12 17:10 ` [pushed 0/2] Fix test-cp-name-parser build Tom Tromey 2 siblings, 0 replies; 6+ messages in thread From: Pedro Alves @ 2019-03-12 17:03 UTC (permalink / raw) To: gdb-patches $ make test-cp-name-parser ... CXX test-cp-name-parser.o src/gdb/cp-name-parser.y: In function âint gdb::main(int, char**)â: src/gdb/cp-name-parser.y:2137:6: error: unused variable âlenâ [-Werror=unused-variable] int len; ^~~ cc1plus: all warnings being treated as errors gdb/ChangeLog: 2019-03-12 Pedro Alves <palves@redhat.com> * cp-name-parser.y (main): Remove unused 'len' variable. --- gdb/ChangeLog | 4 ++++ gdb/cp-name-parser.y | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6903f2281..44aa9a3b94 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Pedro Alves <palves@redhat.com> + + * cp-name-parser.y (main): Remove unused 'len' variable. + 2019-03-12 Tom Tromey <tromey@adacore.com> * common/ptid.c (null_ptid, minus_one_ptid): Now const. diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 284b1ff121..ec1721007f 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -2129,7 +2129,6 @@ main (int argc, char **argv) if (argv[arg] == NULL) while (fgets (buf, 65536, stdin) != NULL) { - int len; buf[strlen (buf) - 1] = 0; /* Use DMGL_VERBOSE to get expanded standard substitutions. */ c = trim_chars (buf, &extra_chars); -- 2.14.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [pushed 2/2] Fix test-cp-name-parser build, parser_fprintf undefined 2019-03-12 17:03 [pushed 0/2] Fix test-cp-name-parser build Pedro Alves 2019-03-12 17:03 ` [pushed 1/2] Fix test-cp-name-parser build, unused variable Pedro Alves @ 2019-03-12 17:03 ` Pedro Alves 2019-03-12 17:10 ` [pushed 0/2] Fix test-cp-name-parser build Tom Tromey 2 siblings, 0 replies; 6+ messages in thread From: Pedro Alves @ 2019-03-12 17:03 UTC (permalink / raw) To: gdb-patches $ make test-cp-name-parser ... test-cp-name-parser.o: In function `yy_symbol_print(_IO_FILE*, int, YYSTYPE const*, cpname_state*)': build/gdb/cp-name-parser.c.tmp:1335: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)' build/gdb/cp-name-parser.c.tmp:1339: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)' test-cp-name-parser.o: In function `yy_stack_print(short*, short*)': build/gdb/cp-name-parser.c.tmp:1350: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)' build/gdb/cp-name-parser.c.tmp:1354: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)' build/gdb/cp-name-parser.c.tmp:1356: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)' build/gdb/cp-name-parser.c.tmp:1376: more undefined references to `parser_fprintf(_IO_FILE*, char const*, ...)' follow collect2: error: ld returned 1 exit status make: *** [Makefile:1833: test-cp-name-parser] Error 1 gdb/ChangeLog: 2019-03-12 Pedro Alves <palves@redhat.com> * yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define. --- gdb/ChangeLog | 4 ++++ gdb/yy-remap.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 44aa9a3b94..2ca2493c0e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Pedro Alves <palves@redhat.com> + + * yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define. + 2019-03-12 Pedro Alves <palves@redhat.com> * cp-name-parser.y (main): Remove unused 'len' variable. diff --git a/gdb/yy-remap.h b/gdb/yy-remap.h index 579b7d2aee..cdd0aae8c6 100644 --- a/gdb/yy-remap.h +++ b/gdb/yy-remap.h @@ -92,6 +92,8 @@ # define YYDEBUG 1 /* Default to yydebug support */ #endif -#define YYFPRINTF parser_fprintf +#ifndef TEST_CPNAMES +# define YYFPRINTF parser_fprintf +#endif #endif /* YY_REMAP_H */ -- 2.14.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pushed 0/2] Fix test-cp-name-parser build 2019-03-12 17:03 [pushed 0/2] Fix test-cp-name-parser build Pedro Alves 2019-03-12 17:03 ` [pushed 1/2] Fix test-cp-name-parser build, unused variable Pedro Alves 2019-03-12 17:03 ` [pushed 2/2] Fix test-cp-name-parser build, parser_fprintf undefined Pedro Alves @ 2019-03-12 17:10 ` Tom Tromey 2019-03-12 17:23 ` Pedro Alves 2 siblings, 1 reply; 6+ messages in thread From: Tom Tromey @ 2019-03-12 17:10 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb-patches Pedro> I'm pondering what could we do to avoid these kinds of regressions. Pedro> We could make the buildbot always build these utilities too. Maybe Pedro> even better, add some testsuite testcase that smoke-tests Pedro> test-cp-name-parser. We could migrate this to use the unit test framework and just not have a separate executable. Tom ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pushed 0/2] Fix test-cp-name-parser build 2019-03-12 17:10 ` [pushed 0/2] Fix test-cp-name-parser build Tom Tromey @ 2019-03-12 17:23 ` Pedro Alves 2019-03-12 17:48 ` Tom Tromey 0 siblings, 1 reply; 6+ messages in thread From: Pedro Alves @ 2019-03-12 17:23 UTC (permalink / raw) To: Tom Tromey; +Cc: gdb-patches On 03/12/2019 05:10 PM, Tom Tromey wrote: > Pedro> I'm pondering what could we do to avoid these kinds of regressions. > Pedro> We could make the buildbot always build these utilities too. Maybe > Pedro> even better, add some testsuite testcase that smoke-tests > Pedro> test-cp-name-parser. > > We could migrate this to use the unit test framework and just not have a > separate executable. Oh that might be even better, indeed. I recall using the executable for quick experimentation when I was working on the wildmatching stuff, but I think hacking in a unit test for experimentation would have worked well enough too. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pushed 0/2] Fix test-cp-name-parser build 2019-03-12 17:23 ` Pedro Alves @ 2019-03-12 17:48 ` Tom Tromey 0 siblings, 0 replies; 6+ messages in thread From: Tom Tromey @ 2019-03-12 17:48 UTC (permalink / raw) To: Pedro Alves; +Cc: Tom Tromey, gdb-patches >>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes: Pedro> I recall using the executable for quick experimentation when I was Pedro> working on the wildmatching stuff, but I think hacking in a unit Pedro> test for experimentation would have worked well enough too. We could also expose it as a "maint" command for this sort of experimentation. Tom ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-12 17:48 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-03-12 17:03 [pushed 0/2] Fix test-cp-name-parser build Pedro Alves 2019-03-12 17:03 ` [pushed 1/2] Fix test-cp-name-parser build, unused variable Pedro Alves 2019-03-12 17:03 ` [pushed 2/2] Fix test-cp-name-parser build, parser_fprintf undefined Pedro Alves 2019-03-12 17:10 ` [pushed 0/2] Fix test-cp-name-parser build Tom Tromey 2019-03-12 17:23 ` Pedro Alves 2019-03-12 17:48 ` Tom Tromey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox