[LLVMdev] fix warning with newer g++ compilers

Chris Lattner
Sat, 15 Dec 2007 17:33:47 -0000

On Dec 14, 2007, at 11:10 PM, Mike Stump wrote:

> Newer g++ compilers can emit:
>
> /Volumes/mrs5/net/llvm/llvm/llvm/lib/AsmParser/LLLexer.cpp:789:
> warning: suggest a space before ';' or explicit braces around empty
> body in 'for' statement
>
> The usual style is to put a space before the ;, or put the ; on a new
> line to visually separate the ; from the for statement, so that the
> follow like doesn't look like it goes with the for.

Hey Mike,

Thanks for the patch.  It doesn't apply because your mailer included
it inline.  If you're using the apple mailer, putting a .patch suffix
on it (instead of .txt) might help.

w.r.t the debate, I'd prefer:

  for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr)
    /*empty*/;

but I really don't care that much :)

-Chris