public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16189] New: obfuscated error message for missing semicolon after declaration in C++
@ 2004-06-25  2:25 bernie at develer dot com
  2004-06-25  2:26 ` [Bug c++/16189] " bernie at develer dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: bernie at develer dot com @ 2004-06-25  2:25 UTC (permalink / raw)
  To: gcc-bugs

Diagnostic for missing semicolons after struct/class
declarations regressed in 3.4.x.

The misleading error message is also reported on
the *last* line of the *following* struct/class
declaration, which makes it hard for the user to
hunt for the source line containing the error.

Additionally, the message is inconsistent
between the C and C++ front ends for no apparent
reason.


$ cat >foo.cc
struct Foo { int i; }   // semicolon missing
struct Bar { int i; };

$ g++341 foo.cc
foo.cc:2: error: multiple types in one declaration

$ mv foo.cc foo.c
$ gcc341 foo.c
foo.c:2: error: two types specified in one empty declaration

$ g++333 foo.cc
foo.cc:2: error: semicolon missing after declaration of `Foo'
foo.cc:2: error: multiple types in one declaration

-- 
           Summary: obfuscated error message for missing semicolon after
                    declaration in C++
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bernie at develer dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16189


^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <bug-16189-6650@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-16189-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-09-08 15:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-25  2:25 [Bug c++/16189] New: obfuscated error message for missing semicolon after declaration in C++ bernie at develer dot com
2004-06-25  2:26 ` [Bug c++/16189] " bernie at develer dot com
2004-06-25  6:35 ` pinskia at gcc dot gnu dot org
2004-07-27 21:25 ` jleatherwood at acm dot org
2004-07-27 22:14 ` bangerth at dealii dot org
2004-07-27 22:47 ` schwab at suse dot de
2004-07-27 23:00 ` jsm at polyomino dot org dot uk
2004-07-28  1:43 ` bernie at develer dot com
2004-07-28  5:26 ` neil at gcc dot gnu dot org
2004-07-31  0:24 ` giovannibajo at libero dot it
     [not found] <bug-16189-6650@http.gcc.gnu.org/bugzilla/>
2006-03-21 16:50 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16189-4@http.gcc.gnu.org/bugzilla/>
2010-11-20 18:50 ` froydnj at gcc dot gnu.org
2011-09-08 15:16 ` redi at gcc dot gnu.org
2011-09-08 15:53 ` froydnj at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).