From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32190 invoked by alias); 15 Oct 2009 15:21:50 -0000 Received: (qmail 32145 invoked by uid 48); 15 Oct 2009 15:21:35 -0000 Date: Thu, 15 Oct 2009 15:21:00 -0000 Message-ID: <20091015152135.32144.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/20385] Lame parse error message for undefined type In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01355.txt.bz2 ------- Comment #4 from manu at gcc dot gnu dot org 2009-10-15 15:21 ------- BTW, Clang claims to get this right. Quoting from: http://clang.llvm.org/diagnostics.html $ gcc-4.2 t.c t.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token $ clang t.c t.c:3:1: error: unknown type name 'foo_t' foo_t *P = 0; ^ This shows an example of much better error recovery. The message coming out of GCC is completely useless for diagnosing the problem, Clang tries much harder and produces a much more useful diagnosis of the problem. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2005-12-18 01:43:44 |2009-10-15 15:21:34 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20385