Summary: Should returning a value in a void function be
                    downgraded to a warning?
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Iain Buclaw <> 2010-08-21 02:59:18 PDT ---
The code:
void main()
    return true;

Results in the compiler error:
test.d(3): Error: long has no effect in expression (true)

Which makes sense, but doesn't really indicate the reasoning very well.
Shouldn't it be instead downgraded to a warning? ie - based on GCC's message:

test.c:(3): Warning: ignoring return value in function returning void

This currently blocks some old D software from building (that, I know, should
really be updated. :)


Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to