From 4d95707db577f44e172804660b98d731f2c69627 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 30 Jan 2014 14:13:01 +0900 Subject: [PATCH] add FALLTHROUGH macro --- include/picrin.h | 3 ++- src/codegen.c | 2 -- src/macro.c | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/picrin.h b/include/picrin.h index c78dad87..9b9222ed 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -33,13 +33,14 @@ extern "C" { #include #include - /* noreturn */ #if __STDC_VERSION__ >= 201112L # define NORETURN _Noreturn #elif __GNUC__ || __clang__ # define NORETURN __attribute__((noreturn)) #endif +#define FALLTHROUGH ((void)0) + #include "config.h" #include "picrin/value.h" diff --git a/src/codegen.c b/src/codegen.c index 8365d5e9..1f7e5c49 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -19,8 +19,6 @@ # error enable PIC_NONE_IS_FALSE #endif -#define FALLTHROUGH ((void)0) - static struct pic_irep * new_irep(pic_state *pic) { diff --git a/src/macro.c b/src/macro.c index 86ba7e07..3ad0a139 100644 --- a/src/macro.c +++ b/src/macro.c @@ -13,8 +13,6 @@ #include "picrin/lib.h" #include "xhash/xhash.h" -#define FALLTHROUGH ((void)0) - static pic_value macroexpand(pic_state *, pic_value, struct pic_senv *); static pic_value macroexpand_list(pic_state *, pic_value, struct pic_senv *);