Tue 10 Jan 2017 03:03:46 AM UTC, original submission:
The following examples:
From JWE:
"Yes, the error message should definitely display the type of index that was used. The functions in lo-array-errwarn.{h,cc} should be modified to accept a parameter that specifies the type of index, then that info should be passed at the point of the error. I'm assuming that the type of index is available at that point. If not, then more significant surgery will be required."
It appears that the two routines that construct this message are:
As suggested, probably the easiest thing to do is add input variables to both of these routines such as
index_exception::expression (std::string openparen, std::string closeparen) const
and use openparen in place of "(" and closeparen in place of ")".
Then compile and see where the compiler complains about function mismatch and make the changes there. It just as efficient doing that as it is testing something like index_type. Even more efficient would be passing just a character (i.e., make the inputs char instead of std::string), but I'm not sure if C++ has defined + operator for a string and just a character.
|