From: Akim Demaille Date: Fri, 30 Nov 2001 11:11:08 +0000 (+0000) Subject: * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty X-Git-Tag: BISON-1_30f~47 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/9e55edfc299936e6af40e5f5bfb19b21bca5a290?ds=inline * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty if body instead of `;' to pacify GCC's warnings. --- 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)