[Issue 4701] Should returning a value in a void function be downgraded to a warning?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 21 04:02:05 PDT 2010


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


Jonathan M Davis <jmdavisProg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmail.com


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmail.com> 2010-08-21 04:02:01 PDT ---
1. Walter hates warnings. He pretty much thinks that everything should either
be an error or not. So, you're generally going to have a hard time getting him
to make anything a warning.

2. Returning a value from a void function is outright incorrect. It's not that
it _might_ be incorrect or that it _might_ cause errors. It is _definitely_
incorrect. I have no idea why gcc wouldn't make that an outright error. It
should be. Then again, C is historically lax about a lot of things that you'd
think that it would consider errors, so that's probably why. Still, I see no
reason to make D match gcc is this regard. D makes the correct choice here.

-- 
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