http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47429
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.01.24 13:26:01 CC| |manu at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-01-24 13:26:01 UTC --- This is an old bug but I cannot find it in bugzilla. There are several issues: * GCC doesn't have the concept of multi-line diagnostic, each line is independent. That is, we cannot do error("this is one line.\nThis is another"). This is not difficult to implement but it is long and tedious. * GCC cannot build a single diagnostic that expands several lines from individual calls. That is, we cannot do Diagnostic diag; diag.error("‘int Blah::test’ is private"); diag.note("within this context") diag.report(); This is much harder (and ugly) to solve in C. I am not sure about the status of Clang/LLVM with respect to this. Last time I looked their diagnostic machinery was too strongly based on GCC's so they suffered the same problem, but there have been loads of changes since then, so perhaps they fixed it already.