On 01/14/2015 09:49 AM, Stefan Monnier wrote: > This is hideous. Why do we need that? Assuming --enable-gcc-warnings, it's a combination of things. First, gcc -Wsuggest-attribute=const complains if it can deduce that an extern function is const but the function wasn't declared const. Second, this particular function is const on some platforms and not on others, so we can't simply declare it to be const everywhere. Third, the DEFUN syntax doesn't give us a way to declare a function const only on some platforms. Fourth, gcc -Wredundant-decls won't let us supply another extern declaration by hand, with the const attribute on platforms that need const, because GCC complains if there are duplicate extern declations. There are several possibilities for how to fix this in a less-ugly way, including: 1. Omit -Wsuggest-attribute=const. 2. Omit -Wredundant-decls. 3. Make make-docfile.c even smarter and/or trickier. The attached patch would do (2), as I expect this is simplest. Would you prefer this?