+[[<command line>:1: error: %define variable 'parse.lac.es-capacity-initial' is not used
+]])
+AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]],
+ [[1]], [],
+[[<command line>:1: error: %define variable 'parse.lac.memory-trace' is not used
+]])
+
+AT_CLEANUP
+
+## --------------------------------------------- ##
+## -Werror is not affected by -Wnone and -Wall. ##
+## --------------------------------------------- ##
+
+AT_SETUP([[-Werror is not affected by -Wnone and -Wall]])
+
+AT_DATA([[input.y]],
+[[%%
+foo-bar: ;
+]])
+
+# -Werror is not enabled by -Wall or equivalent.
+AT_BISON_CHECK([[-Wall input.y]], [[0]], [[]],
+[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
+]])
+AT_BISON_CHECK([[-W input.y]], [[0]], [[]],
+[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
+]])
+AT_BISON_CHECK([[-Wno-none input.y]], [[0]], [[]],
+[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
+]])
+
+# -Werror is not disabled by -Wnone or equivalent.
+AT_BISON_CHECK([[-Werror,none,yacc input.y]], [[1]], [[]], [[stderr]])
+AT_CHECK([[sed 's/^.*bison:/bison:/' stderr]], [[0]],
+[[bison: warnings being treated as errors
+input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
+]])
+[mv stderr experr]
+AT_BISON_CHECK([[-Werror,no-all,yacc input.y]], [[1]], [[]], [[experr]])
+
+AT_CLEANUP
+
+
+## ------------------------------------------------------ ##
+## %name-prefix and %define api.prefix are incompatible. ##
+## ------------------------------------------------------ ##
+
+AT_SETUP([[%name-prefix and %define api.prefix are incompatible]])
+
+# AT_TEST(DIRECTIVES, OPTIONS, ERROR-LOCATION)
+# --------------------------------------------
+m4_pushdef([AT_TEST],
+[AT_DATA([[input.y]],
+[[$1
+%%
+exp:;
+]])
+AT_BISON_CHECK([[$2 input.y]], [[1]], [[]],
+[[$3: error: '%name-prefix' and '%define api.prefix' cannot be used together
+]])
+])
+
+AT_TEST([%define api.prefix foo %name-prefix "bar"], [], [input.y:1.9-18])
+AT_TEST([], [-Dapi.prefix=foo -p bar], [<command line>:1])
+AT_TEST([%name-prefix "bar"], [-Dapi.prefix=foo], [<command line>:1])
+AT_TEST([%define api.prefix foo], [-p bar], [input.y:1.9-18])
+
+m4_popdef([AT_TEST])
+
+AT_CLEANUP
+
+
+## -------------- ##
+## Stray $ or @. ##
+## -------------- ##
+
+AT_SETUP([[Stray $ or @]])
+
+# Give %printer and %destructor "<*> exp TOK" instead of "<*>" to
+# check that the warnings are reported once, not three times.
+
+AT_DATA_GRAMMAR([[input.y]],
+[[%token TOK
+%destructor { $%; @%; } <*> exp TOK;
+%initial-action { $%; @%; };
+%printer { $%; @%; } <*> exp TOK;
+%%
+exp: TOK { $%; @%; $$ = $1; };
+]])
+
+AT_BISON_CHECK([[input.y]], 0, [],
+[[input.y:10.19: warning: stray '$'
+input.y:10.23: warning: stray '@'
+input.y:11.19: warning: stray '$'
+input.y:11.23: warning: stray '@'
+input.y:12.19: warning: stray '$'
+input.y:12.23: warning: stray '@'
+input.y:14.19: warning: stray '$'
+input.y:14.23: warning: stray '@'