kumar_m_kiran
kumar_m_kiran

Reputation: 4022

C++ compiler template error information - tool to decode the error information

All,

Question 1
while using templates, Compiler error information is known to be very cryptic (In the sense not readily readable by a newbee eyes) - though compiler nowadays tries best to put as much information as possible during coding problem.

Is there a chance - that the error information is more better in some compilers than others? If So can you please guide me which compiler gives more clearer information.

Question 2
The problem with template code compiler error resolving is two fold - lack of experience/ability to decode the error and also some blame to the compiler not able to give only as much information as possible which can be understood by the "human logic interpretation"

Is there any tool/options in compiler to make it more readable?


PS : Currently I use gcc 4.1.2, and less often XlC_r (Version 6) and aCC (for HP)

Thanks for your input in advance.

Upvotes: 4

Views: 849

Answers (3)

Simone
Simone

Reputation: 11797

AFAIK, Comeau's compiler should be pretty good. You can also try an online version of it. Of course, it doesn't come for free.

As for tools, there's STLFilt but it doesn't seems updated anymore.

Upvotes: 0

ismail
ismail

Reputation: 47672

If your platform can't support clang for some reason try STLFilt to get sensible errors.

Upvotes: 3

Greg Hewgill
Greg Hewgill

Reputation: 994787

I have read that the Clang compiler for LLVM has good diagnostics. (But I haven't tried it myself.)

Upvotes: 0

Related Questions