lkml.org 
[lkml]   [2017]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ib_srp: Let compiler ignore the useless debug code
On Fri, Feb 24, 2017 at 04:16:31PM +0000, Bart Van Assche wrote:
> On Fri, 2017-02-24 at 16:44 +0800, Minfei Huang wrote:
> > "if (0)" is used to make this block of debug code not be executed. There
> > is a more elegant way to let compiler ignore this code, using
> > "#if 0 .. #endif" instead.
> >
> > Although it may be optimised by some compilers with specified parameter,
> > just for readable.
>
> #if 0 / #endif prevents the compiler from checking the syntax of the code.
> Such code tends to grow syntax errors. So I'm not sure this patch is an
> improvement.

Agree and especially without support of bloat-o-meter, all these talks
about dumb compiler are not informative.

>
> Bart.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-03-05 09:23    [W:0.067 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site