This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
[ Reported to the Debian BTS as report #122103. Please CC 122103@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/122103 ] Accidentally leaving the close brace off of a block in e.g., a header file will often result in errors in files that include it, without any indication of what is wrong. For example, leaving a namespace open will usually just give a parse error at the end of the including file. I'd appreciate it if a warning were issued at the end of a file if there are still any blocks open. I realize that leaving a block open through a file ending is not a violation of the ISO standard's letter or spirit; however, I believe it is usually a mistake, and one that is otherwise hard to track down. A compiler warning would make tracking it down much easier, and is unlikely to give any false alarms. Release: 3.2.1 (Debian) (Debian unstable) Environment: System: Debian GNU/Linux (unstable) Architecture: i686 host: i386-linux Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20021212 (Debian prerelease)
Hello, can you provide a small testcase for this problem? And if possible verify that this is still the case in gcc 3.3? Thanks, Dara
See Dara's question.
Actually is very easy to show: //header.h struct A { int i; //forgot to close the struct. //file.c #include "header.h" int f(struct A *a) { a->i=0; } gcc file.c file.c:4: error: field `f' declared as a function file.c:4: warning: no semicolon at end of struct or union file.c:4: error: parse error before '{' token
I'm not sure what the last 4 messages in the PR are, but they're not particularly useful to us. Could gcc-bugs be taken off the cc: list for them? Thanks.
They are auto-replies from debian's bug system. I changed the bug reporter so it would stop the mail loop. I wish the debian guys would stop putting auto-responders as the owners of bugs. There are quite a few. If you need to modify a bug that it cc'ed to a @bugs.debian.org address, please let me know first so i can change who owns it without it sending out email.
Nothing to do with CPP.