Direct recursion detection possible?
Cecil Ward
cecil at cecilward.com
Thu May 25 13:54:27 UTC 2023
On Thursday, 25 May 2023 at 13:46:32 UTC, Cecil Ward wrote:
> On Thursday, 25 May 2023 at 10:35:45 UTC, Quirin Schroll wrote:
>> On Wednesday, 24 May 2023 at 23:04:53 UTC, Cecil Ward wrote:
>>> [...]
>>
>> I had this almost happen in my C++ code. It never ran because
>> I got a compile error. The compiler is MSVC.
>>
>> [...]
>
> My apologies, when I wrote ‘straightforward’ I should meant to
> say, ‘without body, with no content’. You mentioned without
> side-effects, which is more general and very useful.
I would prefer it to come from the front end, but I thought that
would be too hard to get any volunteers, so that is why I
suggested the back end. Following your idea I suggest there
should also be a test in the back end but I would make that an
error too seeing as some people ignore warnings and if ever there
were a case more serious than a warning this is it.
I don’t agree with your point about optimisation because
optimisation often discovers andditional information. CTFE and
constant propagation are surely examples - is that correct? And
additional information can detect more bugs in principle.
More information about the Digitalmars-d
mailing list