Re: [PATCH] avoid -Wsuggest-attribute=const for void functions (PR 83559)

2018-01-02 Thread Jeff Law
On 01/01/2018 05:50 PM, Martin Sebor wrote: > Among the recent -Wattributes enhancements is to diagnose > declarations of void functions with attribute const or pure. > Declaring a void function const or pure means that calls to > the function have no effect and could be (and, with > optimization, 

[PATCH] avoid -Wsuggest-attribute=const for void functions (PR 83559)

2018-01-01 Thread Martin Sebor
Among the recent -Wattributes enhancements is to diagnose declarations of void functions with attribute const or pure. Declaring a void function const or pure means that calls to the function have no effect and could be (and, with optimization, are) eliminated. Thus the attribute on such a functi