Should we warn if we detect null derefernces or void value uses ?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 7 16:12:21 PST 2016


On Wednesday, December 07, 2016 22:10:57 Chris Wright via Digitalmars-d 
wrote:
> On Wed, 07 Dec 2016 04:40:02 -0800, Jonathan M Davis via Digitalmars-d
>
> wrote:
> > Maybe if warnings were completely standardized, it wouldn't be so bad,
>
> Warnings that depend on flow analysis will be a problem. You can't write
> a compliant compiler unless you implement this level of flow analysis --
> but then it's a problem if any compiler produces better flow analysis!

Well, if the code is unambiguously wrong, and it's just that some compilers
catch it and some don't, I'm not sure that that's a big deal, since as soon
as one compiler catches it, you know about it, and you fix it, and since
it's definitely wrong, there should be no problem with fixing it. But it
must be unambiguously bad code, or it definitely is a problem.

- Jonathan M Davis



More information about the Digitalmars-d mailing list