[Issue 10147] Make -w identical to -wi and deprecate it

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 24 10:05:48 PDT 2013


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



--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-05-24 10:05:44 PDT ---
> That seems like a problem with lack of testing from the developer. 

In this case, yes, but there may be cases where that's not true. But if even
there aren't, it means that we have a flag which changes what's legal in the
language and therefore potentially changes the semantics of code, which risks
bugs without good reason IMHO.

> GCC has similar features like -pedantic-errors and -Werror=
> (http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Warning-Options.html).

C++ doesn't have the compile time introspection capabilities that D has, so it
wouldn't have as many issues with it. If it's really only a matter of make it
so that no object code is generated when I have have warnings, then that
wouldn't be a big deal, but in D, it actually affects the semantics of the
program. And it wouldn't even necessarily change them in a way that causes the
program to not compile. It could be that it would result in simply taking the
wrong/inefficient overload without the programmer knowing. e.g.

auto foo(T)(T t)
    if(isBar!T)
{...}

auto foo(T)(T t)
    if(!isBar!T)
{...}

> I'd hate to have to manually abort the compiler process on the first warning
> message.

I don't follow. Why would anything have to be manually aborted?

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