From a93ef815be794a5afdaffd33b896cd64dc5f0a75 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 12 Aug 2020 21:22:21 +0900 Subject: Add static check for `MRB_USE_FLOAT` and `MRB_WITHOUT_FLOAT`. --- include/mrbconf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/mrbconf.h b/include/mrbconf.h index 0d3d1ae5a..3867619a9 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -31,6 +31,10 @@ /* exclude floating point numbers */ //#define MRB_WITHOUT_FLOAT +#if defined(MRB_USE_FLOAT) && defined(MRB_WITHOUT_FLOAT) +#error Cannot define MRB_USE_FLOAT and MRB_WITHOUT_FLOAT at the same time +#endif + /* stop inlining floating point numbers in mrb_value (effective only with MRB_WORD_BOXING)*/ /* floating numbers are rounded to fit in 30 bits (float) and 62 bits respectively, */ /* by inlining. If you need full precision of floating numbers on the platform, */ -- cgit v1.2.3