c++: Make diagnostic translatable [PR109309]
Checks
Commit Message
Tested x86_64-linux. OK for trunk?
-- >8 --
gcc/cp/ChangeLog:
PR c++/109309
* contracts.cc (check_postcondition_result): Use complete
strings for diagnostics, so they can be translated.
---
gcc/cp/contracts.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
Ignore this one - jakub just committed a fix.
@@ -639,12 +639,12 @@ check_postcondition_result (tree decl, tree type, location_t loc)
{
const char* what;
if (DECL_CONSTRUCTOR_P (decl))
- what = "constructor";
+ what = "constructor does not return a value to test";
else if (DECL_DESTRUCTOR_P (decl))
- what = "destructor";
+ what = "destructor does not return a value to test";
else
- what = "function";
- error_at (loc, "%s does not return a value to test", what);
+ what = "function does not return a value to test";
+ error_at (loc, "%s", what);
return false;
}