public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Updated GCC vs Clang diagnostics
@ 2012-04-12 21:50 Manuel López-Ibáñez
  2012-04-12 21:54 ` Gabriel Dos Reis
  0 siblings, 1 reply; 35+ messages in thread
From: Manuel López-Ibáñez @ 2012-04-12 21:50 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc Mailing List

Hi Jonathan,

I think the wiki page is a great idea! Thanks for doing this.

I am planning to open PRs for all the issues where GCC is worse. I
think it would be nice to have even more examples where GCC is better.
Examples where GCC is worse can be added to
http://gcc.gnu.org/wiki/Better_Diagnostics

About automatic macro expansion, actually Clang does not expand
macros, they simply track macro locations. GCC can do this right now
with -ftrack-macro-expansion, which hopefully will be enabled by
default in GCC 4.8 thanks to Dodji's work. And I have a very simple
patch that shows the caret for those macro expansions, so the output
is the same (except colors and ranges).

Then, there are three obvious differences between GCC's and Clang's
diagnostics shown int that page: color, ranges and fix-it hints.

* The diagnostics support to print a range given two locations is
trivial to implement. However, modifying the location machinery so it
tracks ranges seems much more complex (and deciding which range to
choose in each diagnostic is a lot of work, because there are a lot of
diagnostics).

* Implementing color is trivial and there are reference
implementations in GNU grep and GNU make. It would be much more
reliable than parsing the output of GCC. Specially with caret
diagnostics.

* Fix-it hints would also be quite trivial to implement, but it would
be a lot of work to decide which diagnostics should use it, and how.

Of course, the major question is: Are the decision makers in GCC
interested on any of this?

Would some reviewer reject patches implementing them?

Are there any conditions attached to the implementation that would be
good to know beforehand?

Cheers,

Manuel.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-04-14  6:58 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 21:50 Updated GCC vs Clang diagnostics Manuel López-Ibáñez
2012-04-12 21:54 ` Gabriel Dos Reis
2012-04-12 22:05   ` Manuel López-Ibáñez
2012-04-12 22:18     ` Lawrence Crowl
2012-04-13  5:12       ` Ian Lance Taylor
2012-04-13  5:58         ` Gabriel Dos Reis
2012-04-13  6:03         ` Jakub Jelinek
2012-04-13  6:07           ` Gabriel Dos Reis
2012-04-13  8:41           ` Manuel López-Ibáñez
2012-04-13  8:47             ` Gabriel Dos Reis
2012-04-13  9:00               ` Manuel López-Ibáñez
2012-04-13  9:09                 ` Gabriel Dos Reis
2012-04-13 14:23                   ` Jakub Jelinek
2012-04-13 15:23                     ` Gabriel Dos Reis
2012-04-13 15:30                       ` NightStrike
2012-04-13 15:36                         ` Gabriel Dos Reis
2012-04-13 15:41                           ` NightStrike
2012-04-13 15:53                             ` Gabriel Dos Reis
2012-04-13 15:59                               ` NightStrike
2012-04-13 16:02                                 ` Gabriel Dos Reis
2012-04-13 20:59         ` Lawrence Crowl
2012-04-14  6:58           ` Marc Glisse
2012-04-12 22:18     ` Gabriel Dos Reis
2012-04-12 22:43       ` Manuel López-Ibáñez
2012-04-13  1:40         ` Joe Buck
2012-04-13  2:27           ` Manuel López-Ibáñez
2012-04-13  3:37             ` Gabriel Dos Reis
2012-04-13  8:27               ` Manuel López-Ibáñez
2012-04-13  8:41                 ` Gabriel Dos Reis
2012-04-13  9:08                 ` Jonathan Wakely
2012-04-13  8:59           ` Jonathan Wakely
2012-04-13  9:04             ` Gabriel Dos Reis
2012-04-13 10:54               ` Manuel López-Ibáñez
2012-04-13 11:36                 ` Richard Guenther
2012-04-13 13:40                   ` Gabriel Dos Reis

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