By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 833 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

Verbosity of C++ errors

P: n/a
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
Share this Question
Share on Google+
10 Replies


P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a

"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

P: n/a

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

P: n/a

"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.