$ 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.
+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.
# define YYDEBUG 1 /* Default to yydebug support */
#endif
-#define YYFPRINTF parser_fprintf
+#ifndef TEST_CPNAMES
+# define YYFPRINTF parser_fprintf
+#endif
#endif /* YY_REMAP_H */