public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/16189] obfuscated error message for missing semicolon after declaration in C++
Date: Tue, 27 Jul 2004 22:14:00 -0000	[thread overview]
Message-ID: <20040727221409.635.qmail@sourceware.org> (raw)
In-Reply-To: <20040625022408.16189.bernie@develer.com>


------- Additional Comments From bangerth at dealii dot org  2004-07-27 22:14 -------
The reason why this is so hard to get right is that the compiler can't 
know what comes after the closing brace of the structure declaration. 
It can't assume that you just forgot a semicolon, since all the 
following lines are valid (including the last one, which is really ugly): 
-------------- 
struct S1 {} s1; 
struct S2 {} s2a, &s2b=s2a; 
struct S3 {} ***s3; 
struct S4 {} typedef s4; 
-------------- 
I guess you get the message what makes compiler writer's life hard. gcc's 
present message is actually not so far away from what one can really 
do in this case. 
 
W. 

-- 


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


  parent reply	other threads:[~2004-07-27 22:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-25  2:25 [Bug c++/16189] New: " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040727221409.635.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).