Commit 3a92a4e3 authored by dearblue's avatar dearblue

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. e993b83c
parent 6f53e2c0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment