From: Julian Seward Date: Fri, 16 Feb 2007 13:57:07 +0000 (+0000) Subject: --wait-for-gdb=yes: gcc 4.1.2 now appears to delete do-nothing loops, so X-Git-Tag: svn/VALGRIND_3_3_0~369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15f33c3c9152bc5ee5de74b3c1c3c42b09b2d2b1;p=thirdparty%2Fvalgrind.git --wait-for-gdb=yes: gcc 4.1.2 now appears to delete do-nothing loops, so make the loop variable volatile so it can't do that. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6595 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 5c5c564d34..b54b757fd4 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1586,7 +1586,8 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) /* Hook to delay things long enough so we can get the pid and attach GDB in another shell. */ if (VG_(clo_wait_for_gdb)) { - Long q, iters; + Long iters; + volatile Long q; VG_(debugLog)(1, "main", "Wait for GDB\n"); VG_(printf)("pid=%d, entering delay loop\n", VG_(getpid)());