[Issue 14419] [CTFE] Need infinite loop detection?

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Apr 6 09:17:43 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14419

Jens Bauer <jens-bugzilla at gpio.dk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jens-bugzilla at gpio.dk

--- Comment #1 from Jens Bauer <jens-bugzilla at gpio.dk> ---
Luckily you just prevented me from pressing "Submit Issue" in filing a
duplicate by approximately 1 second!

Some further thoughts:

In the particular code snippet, my 'Reset_Handler' does not return a value.
Since D specifies that a void is the same as int returning 0, then it would
make sense to completely avoid evaluating functions that return 'void', and
just insert a 0 in the array instead, possibly giving an error or warning.
This would also speed up build time for other functions.

-Thinking a bit further: What if something else was initialized by a list of
functions returning void in an array - that's abusing the functionality and I
do not know if it's possible to do so.

--


More information about the Digitalmars-d-bugs mailing list