I tried to build GDB 7.6 (same error with 7.6.1) on Windows 7 using MinGW with msys terminal. I changed none of the standard configuration, just unpacked everything and performed ./configure and ./make The problem occurred during compilation of file gdb-7.6\readline\util.c I fixed a missing ; in line 392 (closed do-while-loop at end of '_rl_strnicmp'-function). Best regards, Markus
Markus, It would be useful to post the error message you got when you build GDB, and the version of GCC you used, so that other people can reproduce the problem in their env. If you have a patch to fix the error, you can contribute it. Please read https://sourceware.org/gdb/wiki/ContributionChecklist for more details.
gcc version: 4.8.1 error message: util.c: In function '_rl_strnicmp': util.c:394:3: error: expected ';' before 'return' return (0); ^ I guess this occurs only during the build on windows because otherwise I couldn't imagine why this error wasn't discovered earlier. By the way, if you look into the util.c I think this error is quite obvious, or is there any case where the ; could be missed? Best regards, Markus
(In reply to hager-markus from comment #2) > gcc version: 4.8.1 > > error message: > util.c: In function '_rl_strnicmp': > util.c:394:3: error: expected ';' before 'return' > return (0); > ^ > > I guess this occurs only during the build on windows because otherwise I > couldn't imagine why this error wasn't discovered earlier. By the way, if > you look into the util.c I think this error is quite obvious, or is there > any case where the ; could be missed? > I am using i686-pc-mingw32-gcc to cross compile GDB for windows. I didn't see the error before. This piece of code is surrounded by #if !defined (HAVE_STRCASECMP) and #endif, HAVE_STRCASECMP is defined in my config.h. This piece of code is not compiled for me, and probably that is the reason why I didn't see this error before. GDB is using readline from (http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html). Please report this error to bug-readline@gnu.org, get it fixed, and then backport the fix to GDB.
I don't have such build error, I'm using msys1 and mingw-gcc 4.6.3 dw2 version. Yuanhui Zhang
> Please report > this error to bug-readline@gnu.org, get it fixed, and then backport the fix > to GDB. I received the following from the readline-team, so it is already fixed: Thanks for the report. This was reported and fixed earlier. Adding the semicolon is the right fix. This is a lightly-used piece of code (obviously), so I probably will not release it as a patch. The gdb developers can put in the straightforward fix and move forward. Chet
Patch was committed. Close this PR. 2013-09-23 Martin Benda <martin.benda@omsquare.com> Checked in by Joel Brobecker <brobecker@adacore.com> * util.c (_rl_strnicmp): Add missing semicolon.