This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] GCC caret diagnostics
On Wed, Mar 12, 2008 at 11:00 PM, Chris Lattner <clattner@apple.com> wrote:
>
>
> On Mar 12, 2008, at 5:07 PM, Manuel López-Ibáñez wrote:
>
> > On 08/03/2008, Chris Lattner <clattner@apple.com> wrote:
> >>
> >> clang points into the original input buffer that was lexed from.
> >> This
> >> requires keeping the original files mapped into the address space of
> >> the compiler. However, clang only produces diagnostics from the
> >> front-
> >> end, not from the middle-end.
> >
> > So no warnings for uninitialized variables?
>
> The clang front-end generates these warnings. This means that the set
> of warnings produced by the compiler doesn't change as the optimizer
> evolves, are generally less mystifying to the user, and have perfect
> location info as a side effect. People who use -Werror tend to prefer
> when they don't get new random warnings due to a compiler upgrade.
> This approach is similar to what Java compilers do and frontends like
> EDG do (afaik).
I strongly support this point of view, and I would like to encourage fellow
GCC developers to give it considerations. I know Mark Mittchell had
spoken in favour of it in the past.
>
> The Clang project is also growing a static analysis engine which is
> very adept at solving path sensitive versions of these problems, which
> is useful for finding deeper bugs.
This is a debate we would like to have in a different thread :-)