473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Verbosity of C++ errors

Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose?
To keep this on topic, does the standard guarantee this? :)

Thanks,
Joe
Jun 26 '06 #1
10 1878
Joe Van Dyk wrote:
Why are compiler errors in C++ generally so friggen ugly and verbose?
I assume you are talking about error messages received when you use
templated parts of the Standard Library. You should take a look at
Leor Zolman's STLFilt, which combats the issue you describe:

http://www.bdsoft.com/tools/stlfilt.html

In addition, Scott Meyers devotes a chapter of Effective STL to this
problem and what to do about it.
To keep this on topic, does the standard guarantee this? :)


To answer your rhetorical question, it's a quality-of-implementation
issue. But STLFilt helps matters quite a bit.

Best regards,

Tom

Jun 26 '06 #2

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:J1********@news.boeing.com...
Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose? To
keep this on topic, does the standard guarantee this? :)

Thanks,
Joe


No. In fact, section 86.1.5.33, sub-section A4b, paragraph 1462.5 states
quite clearly that "Whereas it can be admitteldy arguable as to the veracity
of the claim that a demonstrable paucity of verbosity, in regards to the
aforementioned textual representation of indications of incorrectness or
other undesireable constructs heretofore presented as requiring of a
reasonable response on the part of the implementation indeed does not fail
to contribute less than a minimally acceptable understanding of said
indications, therefore it shall be the intent of this standard that
implementors of such textual representations shall, in all cases,
notwithstanding prior, existing or subsequent limitations applicable on a
per platform basis, endeavor to make said representations brief and concise.
-not Joe

(ok, so I got a little high at lunch...)
Jun 26 '06 #3
In article <J1********@news.boeing.com>, jo********@boeing.com
says...

[ ... ]
Why are compiler errors in C++ generally so friggen ugly and verbose?
The nasty ones mostly happen in templated code -- the more heavily
templated, the nastier they get. When the compiler has three layers
of templates, each taking other templates as parameters, things can
get truly ugly indeed. Many of the problems in the error messages
arise because the compiler tries to show you every template it
thought might be a match for the parameters you passed, and that can
be a lot to look through -- especially since a mismatch at one level
can lead it in entirely the wrong direction with some of the other
templates it starts searching through and showing you.

Depending on the compiler you're using, you might want to look at
Leor Zolman's stlfilt, available (for free) from somewhere or other
other under www.bdsoft.com. This isn't a panacea by any means, but it
does help to sort out messages arising from the standard library
container templates and such.
To keep this on topic, does the standard guarantee this? :)


As, you'd expect, no.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jun 26 '06 #4

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:J1********@news.boeing.com...
Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose? To
keep this on topic, does the standard guarantee this? :)

I very much doubt that the standard is going to have any teeth to it as it
regards a vendor's compiler's mistreatment of its user. When I get an
error, I know two things: I've got an error; it has nothing to do with what
the compiler said the error was. cheers, fu
Jun 26 '06 #5

Joe Van Dyk wrote:
Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose?


I know, I know...I would much rather the stupid compiler just said
something brief like, "There was an error," and be done with it.
Verbosity sucks.

Jun 26 '06 #6

"Jerry Coffin" <jc*****@taeus.com> wrote in message
news:MP************************@news.sunsite.dk...
In article <J1********@news.boeing.com>, jo********@boeing.com
says...

[ ... ]
Why are compiler errors in C++ generally so friggen ugly and verbose?


The nasty ones mostly happen in templated code -- the more heavily
templated, the nastier they get. When the compiler has three layers
of templates, each taking other templates as parameters, things can
get truly ugly indeed. Many of the problems in the error messages
arise because the compiler tries to show you every template it
thought might be a match for the parameters you passed, and that can
be a lot to look through -- especially since a mismatch at one level
can lead it in entirely the wrong direction with some of the other
templates it starts searching through and showing you.

Depending on the compiler you're using, you might want to look at
Leor Zolman's stlfilt, available (for free) from somewhere or other
other under www.bdsoft.com. This isn't a panacea by any means, but it
does help to sort out messages arising from the standard library
container templates and such.
To keep this on topic, does the standard guarantee this? :)


As, you'd expect, no.

--
Later,
Jerry.

The universe is a figment of its own imagination.

--------
Jim Langston
Jun 26 '06 #7
On 2006-06-26, Howard <al*****@hotmail.com> wrote:

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:J1********@news.boeing.com...
Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose? To
keep this on topic, does the standard guarantee this? :)

Thanks,
Joe
No. In fact, section 86.1.5.33, sub-section A4b, paragraph 1462.5 states
quite clearly that "Whereas it can be admitteldy arguable as to the veracity
of the claim that a demonstrable paucity of verbosity, in regards to the
aforementioned textual representation of indications of incorrectness or
other undesireable constructs heretofore presented as requiring of a
reasonable response on the part of the implementation indeed does not fail
to contribute less than a minimally acceptable understanding of said
indications, therefore it shall be the intent of this standard that
implementors of such textual representations shall, in all cases,
notwithstanding prior, existing or subsequent limitations applicable on a
per platform basis, endeavor to make said representations brief and concise.


I'm vaguely concerned that I understood that the first time I read it
perfectly.

-not Joe

(ok, so I got a little high at lunch...)


That'd explain it.

--
Andrew Poelstra < http://www.wpsoftware.net/blog >
To email me, use "apoelstra" at the above address.
I know that area of town like the back of my head.
Jun 26 '06 #8
Joe Van Dyk wrote:
Thomas Tutone wrote:
Joe Van Dyk wrote:

Why are compiler errors in C++ generally so friggen ugly and verbose?


I assume you are talking about error messages received when you use
templated parts of the Standard Library. You should take a look at
Leor Zolman's STLFilt, which combats the issue you describe:

http://www.bdsoft.com/tools/stlfilt.html

In addition, Scott Meyers devotes a chapter of Effective STL to this
problem and what to do about it.

Thanks, I'll check that out.

Can you give me a small sample program that would likely give me an
almost-unreadable compiler error that stlfilt handles?


Nevermind, found one.

http://www.bdsoft.com/dist/gcc-demo.txt

To keep this on topic, does the standard guarantee this? :)


To answer your rhetorical question, it's a quality-of-implementation
issue. But STLFilt helps matters quite a bit.

Best regards,

Tom


Jun 26 '06 #9
Thomas Tutone wrote:
Joe Van Dyk wrote:

Why are compiler errors in C++ generally so friggen ugly and verbose?

I assume you are talking about error messages received when you use
templated parts of the Standard Library. You should take a look at
Leor Zolman's STLFilt, which combats the issue you describe:

http://www.bdsoft.com/tools/stlfilt.html

In addition, Scott Meyers devotes a chapter of Effective STL to this
problem and what to do about it.


Thanks, I'll check that out.

Can you give me a small sample program that would likely give me an
almost-unreadable compiler error that stlfilt handles?

Thanks,
Joe

To keep this on topic, does the standard guarantee this? :)

To answer your rhetorical question, it's a quality-of-implementation
issue. But STLFilt helps matters quite a bit.

Best regards,

Tom

Jun 26 '06 #10

"Andrew Poelstra" <ap*******@localhost.localdomain> wrote in message
news:slrnea0nts.r5l.ap*******@localhost.localdomai n...
On 2006-06-26, Howard <al*****@hotmail.com> wrote:

"Joe Van Dyk" <jo********@boeing.com> wrote in message
news:J1********@news.boeing.com...
Hi,

Why are compiler errors in C++ generally so friggen ugly and verbose? To
keep this on topic, does the standard guarantee this? :)

Thanks,
Joe


No. In fact, section 86.1.5.33, sub-section A4b, paragraph 1462.5 states
quite clearly that "Whereas it can be admitteldy arguable as to the
veracity
of the claim that a demonstrable paucity of verbosity, in regards to the
aforementioned textual representation of indications of incorrectness or
other undesireable constructs heretofore presented as requiring of a
reasonable response on the part of the implementation indeed does not
fail
to contribute less than a minimally acceptable understanding of said
indications, therefore it shall be the intent of this standard that
implementors of such textual representations shall, in all cases,
notwithstanding prior, existing or subsequent limitations applicable on a
per platform basis, endeavor to make said representations brief and
concise.


I'm vaguely concerned that I understood that the first time I read it
perfectly.

-not Joe

(ok, so I got a little high at lunch...):-)


That'd explain it.

I'd like to address this in a manner that I think can remain topical. I
would like to get meaningful statements from my compiler. I never read
the error: "Dude, outside what is commented out, the number of your left
curly braces is unequal to the number on of '}'. Would you like me to
position the caret at the place where I think you need help?" Syntax
masochism does not number among my norms. ciao, f
Jun 27 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the...
4
by: | last post by:
I would like to get people's views on the best way to implement verbosity (or any command-line option) into python scripts. The three styles I'm wrestling with are: def func(): #do stuff if...
2
by: Trev | last post by:
SQL Server 2000 BE, Access 2002 FE. I want to write a stored procedure, that will among other things log errors to a table, I want to be able to report a summary of work done and errors to the...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
4
by: johnb41 | last post by:
I have a form with a bunch of textboxes. Each text box gets validated with the ErrorProvider. I want the form to process something ONLY when all the textboxes are valid. I found a solution,...
24
by: pat | last post by:
Hi everyone, I've got an exam in c++ in two days and one of the past questions is as follows. Identify 6 syntax and 2 possible runtime errors in this code: class demo {
8
by: ImOk | last post by:
I just have a question about trapping and retrying errors especially file locking or database locks or duplicate key errors. Is there a way after you trap an error to retry the same line that...
2
by: =?Utf-8?B?UmFuZHlz?= | last post by:
This just started when I updated to sp 1 working on a APS.net, Visual Studio 2008, c# Project. When I open a project, I get tons of Errors showing in the list 300+ if I double click on them I go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.