Subject: Re: [boost] [Boost-commit] svn:boost r66441 - in trunk/tools/build/v2: . engine/src engine/src/modules tools
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-11-08 02:35:41
Bryce Lelbach wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Sun, 7 Nov 2010 21:27:50 +0100
> JÃ¼rgen Hunold <juergen.hunold_at_[hidden]> wrote:
>> Hi !
>> On Sunday, 7. November 2010 20:51:11 admin_at_[hidden] wrote:
>> > Modified: trunk/tools/build/v2/engine/src/modules/order.c
>> > ===========================================================================
>> > === --- trunk/tools/build/v2/engine/src/modules/order.c (original) +++
>> > trunk/tools/build/v2/engine/src/modules/order.c 2010-11-07 14:51:05
>> > EST (Sun, 07 Nov 2010) @@ -50,8 +50,8 @@
>> > if (colors[adjacent_vertex] == white)
>> > do_ts(graph, adjacent_vertex, colors, result_ptr);
>> > - else if (colors[adjacent_vertex] == gray)
>> > - ; /* This is loop. Not sure what to do... */
>> > + //else if (colors[adjacent_vertex] == gray)
>> > + //; /* This is loop. Not sure what to do... */
>> > }
>> > colors[current_vertex] = black;
>> > **result_ptr = current_vertex;
>> Are you sure that you really wanted to commit this ?
> It's dead code. I'm sure it doesn't matter if I remove it or not.
It is not dead code, it's code that has no side effects. Are you sure clang
actually claims is "dead", that is, never executed? If so, it's clang bug.
Also, "//" comments are not OK in C code, which bjam is at present.
And generally, I'd prefer not to have executable code commented out, as it
sends mixed signals to readers. If clang really cannot be persuaded, you can
/* The vertex is either black, in which case we don't have to do anything,
a gray, in which case we have a loop. If we have a loop, it's not clear
that useful diagnostic we can emit. */
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk