summaryrefslogtreecommitdiff
path: root/data/skeletons
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-04-30 08:04:53 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-04-30 08:07:55 +0200
commitfb1d76d9a92a4b6256123e62cb9b683e41aeb4e1 (patch)
tree61aae9d2a6547618d286ae81b7aee378ecb9940c /data/skeletons
parenta61bc3f9f87ec70559f4fd589f50542280a726f6 (diff)
downloadbison-fb1d76d9a92a4b6256123e62cb9b683e41aeb4e1.tar.gz
yacc.c: avoid the use of a temporary
* data/skeletons/yacc.c: Use YYLLOC_DEFAULT directly with the final destination.
Diffstat (limited to 'data/skeletons')
-rw-r--r--data/skeletons/yacc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c
index 6fed7de5..b6b2672c 100644
--- a/data/skeletons/yacc.c
+++ b/data/skeletons/yacc.c
@@ -2052,10 +2052,8 @@ yyerrlab1:
YY_IGNORE_MAYBE_UNINITIALIZED_END
]b4_locations_if([[
yyerror_range[2] = yylloc;
- /* Using YYLLOC is tempting, but would change the location of
- the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
- *++yylsp = yyloc;]])[
+ ++yylsp;
+ YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);]])[
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);