@hyc@mhoye It’s not the tools’s job to teach the language, but that’s not what’s being asked for here. It *is* the tool’s job to provide meaningful errors, and it has failed here.
@a@mhoye The tool can't read the programmer's mind. Perhaps the "not a string literal" message should have been an error instead of a warning, since it clearly doesn't conform to the function signature. But beyond that, the programmer should know the difference between a string literal and any other data type. That's basic knowledge of the language. Knowing printf's signature is too, that's part of the language spec.
@hyc@a@mhoye it's warning about a multi-character character string, which means it basically does know that this is probably supposed to be double quotes. The programmers designed it to produce this warning here and for this reason, but then phrased the warning in a less coherent way
@a @mhoye The tool can't read the programmer's mind. Perhaps the "not a string literal" message should have been an error instead of a warning, since it clearly doesn't conform to the function signature. But beyond that, the programmer should know the difference between a string literal and any other data type. That's basic knowledge of the language. Knowing printf's signature is too, that's part of the language spec.