From 9e55edfc299936e6af40e5f5bfb19b21bca5a290 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 30 Nov 2001 11:11:08 +0000 Subject: [PATCH] * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty if body instead of `;' to pacify GCC's warnings. --- ChangeLog | 5 +++++ src/bison.simple | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 285053ad..8e22da3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-30 Akim Demaille + + * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty + if body instead of `;' to pacify GCC's warnings. + 2001-11-30 Akim Demaille Instead of mapping the LHS of unused rules to -1, keep the LHS diff --git a/src/bison.simple b/src/bison.simple index ec697755..28869318 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -78,7 +78,8 @@ #if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca -# define YYSTACK_FREE(Ptr) /* empty */ +/* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) #else # define YYSTACK_ALLOC malloc # define YYSTACK_FREE(Ptr) free (Ptr) -- 2.50.0