C++ err msgs

Benjamin Kosnik bkoz@cygnus.com
Wed May 10 16:20:00 GMT 2000


Hmmmmmm. Gaby, now you have me all excited. Do you have any pointers
to what's the current ideas/approaches are? I know Ulrich and I talked
a long long time ago about some kind of state-based system where the
end user could set environment variables (or bits in the specs file)
to set up things like column width, details on the header display
(display once, display every line, don't display, etc.) and then
formatting information (seems best to have some kind of lang-specific
dialect for this part.) 

If you got really rebellious it would be nice to have syntax
high-lighting (typenames in bold, etc.) I seem to be in the minority
here, but syntax hight-lighting is a godsend. 

> I think there is a general agreement that diagnostic messages should
> be formatted nicer.  I just don't see any agreement on what they
> should like.

....the defaults? I don't think the defaults matter as much as the
ability to modify things.


> | Yeah. I wish there was some way to turn this off too, or just display the 
> | name of the file once. That would make a big difference.
> That scheme was proposed by Per.  But I don't recall there was any
> agreement on that.

Count me in the Per camp on this one then. Those multi-line
diagnostics that include the header name 10 times are completely
annoying.


> One of the problems lies in the fact that G++ applies a single flag to
> tell whether declarations should be verbose or not.  Under what
> circumstances default template arguments should be displayed isn't
> that obvious.  Any suggestion is welcome.

again, make it optional? As long as you can turn it off, it doesn't
matter what the defaults are..


>| function `std::messages_base type_info function':
>| /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
>| ring.tcc:54:
>| multiple definition of
>| `
>| std::basic_string
>| <
>|   char,
>|   std::char_traits<char>,
>|   std::allocator<char>
>| >::basic_string(unsigned int, char, std::allocator<char> const &)
>| 
>| 
>| Would be cool if all the messages looked like this......
>
>Is this Gnucally correct? Note that I don't have trouble to implement
>thus scheme (since parts of cp/errors are being rewritten in order to
>be easily parameterized by formatting standards) but I need to know
>that it won't be thrown away.

Dude, I don't know about gnu-ically correct. I do know that it would
be hella useful. As a matter of fact, if you implement this, I
will personally send you a bottle of my favorite cabernet, damn the
shipping costs.

If you had one bottle of wine from everybody who complains about g++
error messages, you would be able to throw quite the party.

;)

-benjamin


More information about the Libstdc++ mailing list