This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/20385] Lame parse error message for undefined type



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]