[Issue 6423] Garbage is returned from `void main()`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 27 08:20:11 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6423


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2013-08-27 08:20:10 PDT ---
(In reply to comment #1)

> I'm guessing perhaps the compiler got confused by returning a void function?
> I'm not sure code like this should be allowed, as it doesn't really make sense
> to be able to return void (via a return statement) -- nothing is being
> returned.

Returning the result of a void function from a void function is accepted by
design.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list