[Lldb-commits] [lldb] r257228 - Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 8 16:27:52 PST 2016


I think it's actually C99 rules, but...

Jim

> On Jan 8, 2016, at 3:25 PM, Adrian McCarthy via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> Oops!  Thanks for the fix.  I'd tested only with clang, which seems to apply C++ rules even with .c files.
> 
> I'm curious why I didn't see this break on any of the build bots.
> 
> Adrian.
> 
> On Fri, Jan 8, 2016 at 3:10 PM, Ying Chen via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> Author: chying
> Date: Fri Jan  8 17:10:56 2016
> New Revision: 257228
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=257228&view=rev
> Log:
> Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc
> 
> - fix buildbot breakage after r257186
> - move declaration outside of for loop
> 
> Modified:
>     lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
> 
> Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c?rev=257228&r1=257227&r2=257228&view=diff
> ==============================================================================
> --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c Fri Jan  8 17:10:56 2016
> @@ -8,8 +8,8 @@
>  int
>  bar(int const *foo)
>  {
> -    int count = 0;
> -    for (int i = 0; i < 10; ++i)
> +    int count = 0, i = 0;
> +    for (; i < 10; ++i)
>      {
>          count += 1;
>          BREAKPOINT_INTRINSIC();
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list