This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++,PATCH,RFC] Error message improvement.


Theodore Papadopoulo wrote:
Because one g++ error message about conditional expression is rather
concise, I had quite some trouble to find an error (I looked in a non
related place). The problem is when the two expressions (not the test)
of a ?: are of different types. In this case, g++ just gives

error: operands to ?: have different types

which is rather uninformative about the types.

The simple patch improves the error message. I have checked that it
compiles and that the error message is indeed improved. I have to work
slightly more to create a testcase and to check that the testsuite needs
no modifications (and it will not be before next monday). But here it is
for comments...

This certainly looks like the right approach.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]