[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-dev
Subject: Re: [cfe-dev] [PATCH] -Wconversion-null
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2012-03-15 11:32:30
Message-ID: 201203151232.30745.l.lunak () suse ! cz
[Download RAW message or body]
On Thursday 15 of March 2012, James K. Lowden wrote:
> No, I can't agree. The purpose of a warning is to indicate when a
> particular operation or construction might be unsafe. A warning about
> something that cannot possibly be an error (as far as the machine is
> concerned) is just noise.
Clang has a lot of noise then. Just one random example:
$clang++ a.cpp
a.cpp:6:16: warning: '&&' within '||' [-Wlogical-op-parentheses]
if( a == 1 && b == 2 || c == 3 )
~~~~~~~^~~~~~~~~ ~~
a.cpp:6:16: note: place parentheses around the '&&' expression to silence this
warning
if( a == 1 && b == 2 || c == 3 )
^
( )
1 warning generated.
> As the standard doesn't define NULL
I think it actually does, to a certain extent, but just turn the warning off
if you like to be special.
--
Lubos Lunak
l.lunak@suse.cz
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic