Open tjpalmer opened 6 years ago
This doesn't work at present:
token.pos.name = name ? name : "<string>";
It gives the following error:
error: Left and right operands of ternary expression must have arithmetic types or identical types
Instead, I have to cast:
token.pos.name = name ? name : (:char const*)"<string>";
It would be nice if the compiler could auto-coerce string literals to char const*.
char const*
There might be other cases where this applies, too, beyond ternaries. It's just the case where I remember I've run across it.
This doesn't work at present:
It gives the following error:
Instead, I have to cast:
It would be nice if the compiler could auto-coerce string literals to
char const*
.There might be other cases where this applies, too, beyond ternaries. It's just the case where I remember I've run across it.