public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17781] New: add STL error message filtering
@ 2004-10-01 19:47 lothar at xcerla dot com
  2004-10-01 20:17 ` [Bug c++/17781] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: lothar at xcerla dot com @ 2004-10-01 19:47 UTC (permalink / raw)
  To: gcc-bugs

Has anybody thought about inserting a capability like STLfilt (see 
http://www.bdsoft.com/tools/stlfilt.html) to gcc? 
 
It woukd be great if gcc would be the first compiler out there having this 
VERY useful feature built in.

-- 
           Summary: add STL error message filtering
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lothar at xcerla dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
@ 2004-10-01 20:17 ` pinskia at gcc dot gnu dot org
  2004-10-01 21:57 ` lothar at xcerla dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-01 20:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-01 20:17 -------
most of the problems come from displaying the default template arguments, see PR 14912 for a bug 
about that.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
  2004-10-01 20:17 ` [Bug c++/17781] " pinskia at gcc dot gnu dot org
@ 2004-10-01 21:57 ` lothar at xcerla dot com
  2004-10-02  0:45 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: lothar at xcerla dot com @ 2004-10-01 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lothar at xcerla dot com  2004-10-01 21:57 -------
STLfilt does a pretty good job already.  
It would be a GREAT use to the average gcc user if gcc only could mimic the  
behaviour of STLfilt. I consider myself quite fluent with STL/templates but  
even I have trouble to parse these long error messages. How much more trouble  
is it to a novice user.  
  
And even if the parsing fails in some situations; it's still worthwile in a  
lot other situations.  
In case it fails to parse the message or the user wants full control gcc could  
provide a switch to turn it off, so she can look (again) to the lengthy full  
error message.  
  
Its just that I'd like to have gcc do the message parsing than having another  
tool to wrap around gcc which may or may not work with different build  
environments.  
  
  

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
  2004-10-01 20:17 ` [Bug c++/17781] " pinskia at gcc dot gnu dot org
  2004-10-01 21:57 ` lothar at xcerla dot com
@ 2004-10-02  0:45 ` giovannibajo at libero dot it
  2004-10-02  0:59 ` lothar at xcerla dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: giovannibajo at libero dot it @ 2004-10-02  0:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-10-02 00:45 -------
No, sorry, GCC won't do this at this point. Our job is making a correct 
diagnostic. If C++ template errors are too hard, we can't help it. This is what 
STLFilt is for. I just hope the next C++ will have a good way to emit compile-
time errors.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
                   ` (2 preceding siblings ...)
  2004-10-02  0:45 ` giovannibajo at libero dot it
@ 2004-10-02  0:59 ` lothar at xcerla dot com
  2004-10-02  1:42 ` giovannibajo at libero dot it
  2004-10-02  8:00 ` pcarlini at suse dot de
  5 siblings, 0 replies; 7+ messages in thread
From: lothar at xcerla dot com @ 2004-10-02  0:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lothar at xcerla dot com  2004-10-02 00:58 -------
Could you please state what "next C++" means (next standard, next version of 
gcc, ...). 
 
Actually I started this entry (with Severity: enhancement) to spawn a 
discussion about adding such aid to the compiler rather than to rely on 
external tools that may or may not work with the users build environment and 
may or may not break with new releases of the compiler. 
 
I believe that readable and understandsable compiler messages are CRUCIAL for 
both compiler writers and compiler users. If users do not understand error 
messages their cry for help will flood the compiler writers. 
 
I also would like to know what arguments speak against such a feature, as it 
proves to be worthwile (why should it be implemented as an external filter 
otherwise). As said before it could be controlled by a flag, so current 
message behaviour will be still available. 
If it is considered useful by enough people, why should it then not be 
included in the compiler? 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
                   ` (3 preceding siblings ...)
  2004-10-02  0:59 ` lothar at xcerla dot com
@ 2004-10-02  1:42 ` giovannibajo at libero dot it
  2004-10-02  8:00 ` pcarlini at suse dot de
  5 siblings, 0 replies; 7+ messages in thread
From: giovannibajo at libero dot it @ 2004-10-02  1:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-10-02 01:42 -------
Subject: Re:  add STL error message filtering

lothar at xcerla dot com wrote:

> Could you please state what "next C++" means (next
> standard, next version of gcc, ...).

Next standard.

> Actually I started this entry (with Severity: enhancement) to spawn a
> discussion about adding such aid to the compiler rather than to rely
> on external tools that may or may not work with the users build
> environment and may or may not break with new releases of the compiler.

I understand that. We get many enhancement requests in Bugzilla, and we use our
own judgement to keep the ones that we think have a reasonable possibility to
ever get implemented. This one is not in this category. There is a widely used
tool, STLFilt, which is free by any means and works very well. It is written in
perl so I guess it works almost everywhere. If the compiler would change its
error message so radically to break it (and notice, it hadn't for a decade or
so), the tool could still be updated in probably less than a couple of hours.

Really, this does not belong to the compiler. It is much more difficult to
implement it in there.

> I believe that readable and understandsable compiler messages are
> CRUCIAL for both compiler writers and compiler users. If users do
> not understand error messages their cry for help will flood the compiler
writers.

I could not agree more. Though, it is not GCC's fault is STL names are complex
and hard to understand. Our job is to produce a correct error message, which
includes a full instantiation specification. If you do not like it, you can use
STLFilt.

> If it is considered useful by enough people, why should it then not be
> included in the compiler?

Because GCC development is not like this. If you feel so strong about this, I
suggest you to start implementing this yourself and prepare a preliminar patch.
You will realize that the code you have to touch is much, much, much more than
a couple of regexp lines that you can use in perl. Otherwise, another option
would be for you to hire someone to do the job.

Giovanni Bajo




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

* [Bug c++/17781] add STL error message filtering
  2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
                   ` (4 preceding siblings ...)
  2004-10-02  1:42 ` giovannibajo at libero dot it
@ 2004-10-02  8:00 ` pcarlini at suse dot de
  5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2004-10-02  8:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-10-02 08:00 -------
Hummm... Something we *could* do is further extending and improving the concept
check machinery in libstdc++-v3 (we are already doing that a bit, actually ;)
and/or bring in the latest improvements in Boost: IMO often the error messages
are more clear and short. Are you already using it?? See:

  http://www.boost.org/libs/concept_check/concept_check.htm

and, of course:

  http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#3

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17781


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

end of thread, other threads:[~2004-10-02  8:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 19:47 [Bug c++/17781] New: add STL error message filtering lothar at xcerla dot com
2004-10-01 20:17 ` [Bug c++/17781] " pinskia at gcc dot gnu dot org
2004-10-01 21:57 ` lothar at xcerla dot com
2004-10-02  0:45 ` giovannibajo at libero dot it
2004-10-02  0:59 ` lothar at xcerla dot com
2004-10-02  1:42 ` giovannibajo at libero dot it
2004-10-02  8:00 ` pcarlini at suse dot de

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