This is the mail archive of the 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]

Re: RFC: c++ diagnostics

On Tue, 2010-04-06 at 12:02 -0700, Joe Buck wrote:
> > >>
> > > 
> > > ...As it happens, some C++ diagnostics are better than the
> > > same diagnostic for C and viceversa.
> On Tue, Apr 06, 2010 at 09:45:11AM -0700, Chris Lattner wrote:
> > I think all the C examples are also valid C++ code, they should apply equally well, but I admit that I didn't try those on g++ to see how it does.  I figured it also didn't matter much because there has surely been significant progress since gcc 4.2.
> Yes, g++ does a better job for some of Chris's examples than gcc does.
> For the second example we get
> t.c:1: error: 'pid_t' has not been declared
> For the third example:
> t.c:2: error: 'int64' does not name a type
> However, most of the criticisms do apply, and the spell checker is a
> very good idea.

The Ada FE does it FWIW:

$ cat
pakage P is
  subtype My_Count is Intger
end P;
$ gcc -c -gnatq incorrect spelling of keyword "package" "Intger" is undefined possible misspelling of "Integer" missing ";"

The checker is in gcc/ada/g-spchge.adb


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