On 08/13/18 16:27, Martin Sebor wrote: > As I said below, the patch for PR 86552, 86711, 86714 that > was first posted on July 19 fixes both of these issues and > also diagnoses calls with unterminated strings: > > https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00155.html >
Sorry, but you you read my comment on your patch here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00184.html ???? So I am strictly opposed to implementing new warnings now, which just papers over existing design issues in this area. I think the most important problem in the strlen folding is that c_strlen and get_range_strlen do not have the the information what kind of string length they should return, (as measured in char/wchar16/wchar32) Most of the time only length in char makes any sense. Only for sprintf processing a different char type may be requested, but the sprintf code in the middle end does not know which is the wchar type. I have sent a followup patch that passes char size units to c_strlen and get_range_strlen here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00795.html I hope you understand, that I would like to fix design issues before implementing new features, since that will obviously become more difficult when even more features are being implemented without fixing some basics first. Bernd.