Avoid warnings from clang's "-Wembedded-directive"

If it gives clang-11.0 `-Wembedded-directive`, a warning will be reported in `include/mruby/boxing_nan.h`.

```
include/mruby/boxing_nan.h:48:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive]
include/mruby/boxing_nan.h:52:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive]
```

The cause of this is #5117.
ref. e993b83c50
This commit is contained in:
dearblue
2020-11-23 21:22:50 +09:00
parent 6f53e2c059
commit 3a92a4e3d8
+4 -5
View File
@@ -41,15 +41,14 @@ union mrb_value_ {
uint64_t u;
#ifdef MRB_64BIT
void *p;
# define BOXNAN_IMMEDIATE_VALUE uint32_t i
#else
# define BOXNAN_IMMEDIATE_VALUE union { uint32_t i; void *p; }
#endif
struct {
MRB_ENDIAN_LOHI(
uint32_t ttt;
#ifdef MRB_64BIT
,uint32_t i;
#else
,union { uint32_t i; void *p; };
#endif
,BOXNAN_IMMEDIATE_VALUE;
)
};
mrb_value value;