------- Comment #12 from manu at gcc dot gnu dot org 2009-08-08 17:05 ------- (In reply to comment #11) > XML output), but I think in practice it's only useful if driven by > cooperation from IDE people who will help establish what the XML should > look like and commit to making an IDE use the XML output in future by > default when using a GCC version that supports it.
Completely agreed. > I imagine that the XML should have some way of marking continuation > messages as such, should include the option (as from > -fdiagnostics-show-option) in some structured way, and probably should > give locations and inclusion context in an XML structured way as well > rather than as plain text - but discussion would be needed with IDE people > on what information GCC can give and how an IDE could use it. Yes, it will require some custom pretty-printing functions to handle XML entities. I think it will also need to address some weaknesses of the current diagnostics/pretty-printing machinery: first/last diagnostic callbacks, handle "\n" in messages correctly, being able to construct a single diagnostic entity from various error/warning/notes (I think this is what you mean by continuation messages). Nothing of this would be difficult. In addition, GCC could expose much more info from the internal representation through XML, when printing %T, %E, %D and such. But it is not worth if no popular IDE is making use of it. I just realized that Clang has already HTML output. http://clang.llvm.org/doxygen/HTMLRewrite_8cpp-source.html They advance really fast! So if anyone is interested on this, he/she should also check what Clang does and which IDEs are using Clang with HTML output, to avoid unnecessary incompatibilities. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19165