bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: math expressions (was: Re: Tail call elimination)


From: Pete Dietl
Subject: Re: math expressions (was: Re: Tail call elimination)
Date: Wed, 27 May 2020 13:47:18 -0500

A few questions.

Technically, the C standard allows for machines which don't use 2's complement.
So should we consider our LONG_MIN to be -2^63 + 1?

Also, signed arithmetic overflow is undefined behavior, so should we also
indicate that we have undefined behavior or should we use some
function that reliably detects and
wraps signed arithmetic?

Bit shifting to the right with signed integers is undefined behavior
too. Usually this is an arithmetic shift,
but it's not guaranteed. Should we try to guarantee this with some
function or should we leave this as undefined behavior?

Before I make my proposal, what do you think of supporting the
following operators:
+, -, /, *, not, and, or, comp, <<, >>

Should the logical operators have english names or should they be C
symbols like !, &, |, ~ ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]