summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2012-02-19 12:54:09 +0100
committerAkim Demaille <demaille@gostai.com>2012-02-19 12:54:09 +0100
commit762caaf6393d71d740ad86855a15f5000721d103 (patch)
tree901c31add90eb10b6aab9ad76418ac46110b8cc0
parentdb3458d6eabc07f7d0c6ee1913dc4ac7c3c3d558 (diff)
downloadbison-762caaf6393d71d740ad86855a15f5000721d103.tar.gz
maint: address sc_prohibit_doubled_word.
* data/yacc.c, doc/bison.texinfo: Reword to avoid having to disable that check. * cfg.mk: No longer skip this test.
-rw-r--r--cfg.mk1
-rw-r--r--data/yacc.c10
-rw-r--r--doc/bison.texinfo2
3 files changed, 6 insertions, 7 deletions
diff --git a/cfg.mk b/cfg.mk
index 0c539cb6..5f8958b0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -37,7 +37,6 @@ local-checks-to-skip = \
sc_immutable_NEWS \
sc_prohibit_always_true_header_tests \
sc_prohibit_atoi_atof \
- sc_prohibit_doubled_word \
sc_prohibit_strcmp
# The local directory containing the checked-out copy of gnulib used in
diff --git a/data/yacc.c b/data/yacc.c
index d59caf34..19b5331d 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -535,19 +535,19 @@ union yyalloc
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO. The source and destination do
+/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
-# define YYCOPY(To, From, Count) \
+# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
+ (Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))
# endif
diff --git a/doc/bison.texinfo b/doc/bison.texinfo
index 7fb05155..62471f46 100644
--- a/doc/bison.texinfo
+++ b/doc/bison.texinfo
@@ -4194,7 +4194,7 @@ In references, in order to specify names containing dots and dashes, an explicit
bracketed syntax @code{$[name]} and @code{@@[name]} must be used:
@example
@group
-if-stmt: IF '(' expr ')' THEN then.stmt ';'
+if-stmt: "if" '(' expr ')' "then" then.stmt ';'
@{ $[if-stmt] = new_if_stmt ($expr, $[then.stmt]); @}
@end group
@end example