On 10/13/20 6:24 PM, Bruno Haible wrote:
To me, this is a pointless warning. Would you agree that a bug report to the GCC people makes sense?
Yes and no. Theoretically, it makes sense that 'const' could apply to static functions too. However the practical argument is weak. Programmers shouldn't be bothering with 'const' on static functions, since the compiler should figure it out. And with extern functions, 'const' would mean the API requires that the function is a no-op, which is a pretty small niche case.