This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c++/47429] -Wfatal-errors hiding line number of offending caller


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.


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