Why does intpromote spew warnings for ~ operator?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Sep 14 16:53:44 UTC 2021


On Tue, Sep 14, 2021 at 07:01:02AM +0000, Alexey via Digitalmars-d wrote:
[...]
> The ability of D to parse C code, doesn't mean it necessarily should
> use same rules in it's own D code.
[...]

You're mistaken, D does not parse C code. D was just designed in such a
way that when a piece of C code happens to parse like D code without
syntax errors, it behaves exactly like the equivalent C code. A lot of C
code, however, does not parse as D code (you will get syntax errors). In
that case, D is free to diverge from C semantics.


T

-- 
Let X be the set not defined by this sentence...


More information about the Digitalmars-d mailing list