On 2/13/2015 9:57 AM, Dominique Devienne wrote:
Warnings are always a tradeoff between pointing out what could be
mistakes/oversights versus senseless noise.
Most times I get the unreachable warning in my code is when I'm actively
coding, experimenting, moving things around, then when I'm
On Thu, Feb 12, 2015 at 8:39 PM, Tim Streater wrote:
> On 12 Feb 2015 at 19:14, R.Smith wrote:
> > On 2/12/2015 8:50 PM, Doug Currie wrote:
> >> It's easy enough to fix if you want 0 to be a valid value for
> TERM_VNULL:
> >>
> >> #if TERM_VNULL
> >>
> If the statement will never be executed the compiler should simply optimise
> it away. No warning is necessary unless you turn on some flag that highlights
> such optimisations.
Per the original post, I believe that the warning was expressly enabled using
the [-Wunreachable-code] compiler
On 12 Feb 2015 at 19:14, R.Smith wrote:
> On 2/12/2015 8:50 PM, Doug Currie wrote:
>> It's easy enough to fix if you want 0 to be a valid value for TERM_VNULL:
>>
>> #if TERM_VNULL
>> if( pTerm->wtFlags & TERM_VNULL ) continue;
>> #endif
>
> Agreed, but how easy it is to
On 2/12/2015 8:50 PM, Doug Currie wrote:
On Thu, Feb 12, 2015 at 1:35 PM, R.Smith wrote:
Now one could argue the warning should not be issued for it, or some
warnings are fine as information. Personally I prefer zero unneeded
warnings/clutter but that's just my pedantism.
On Thu, Feb 12, 2015 at 1:35 PM, R.Smith wrote:
>
> Now one could argue the warning should not be issued for it, or some
> warnings are fine as information. Personally I prefer zero unneeded
> warnings/clutter but that's just my pedantism.
>
My pedantism is to prefer the
On 2/12/2015 4:58 PM, Doug Currie wrote:
Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't
call it a compiler bug.
e
The point is that TERM_VNULL is controlled by a compiler pre-processor
switch and is only unreachable for specific values of that switch -
hence if
Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't
call it a compiler bug.
e
On Thu, Feb 12, 2015 at 9:26 AM, Richard Hipp wrote:
> Dan is right. I think I'd calling this a clang bug.
> On Feb 12, 2015 9:06 AM, "Dan Kennedy"
Dan is right. I think I'd calling this a clang bug.
On Feb 12, 2015 9:06 AM, "Dan Kennedy" wrote:
> On 02/12/2015 09:02 PM, Jens Miltner wrote:
>
>> Hi,
>>
>> I'm getting the following two warnings when compiling sqlite3.c with the
>> latest clang tools:
>>
>>
On 02/12/2015 09:02 PM, Jens Miltner wrote:
Hi,
I'm getting the following two warnings when compiling sqlite3.c with the latest
clang tools:
sqlite3.c:116769:39: warning: code will never be executed [-Wunreachable-code]
if( pTerm->wtFlags & TERM_VNULL ) continue;
10 matches
Mail list logo