In many code bases, -Wsuggest-attribute={const|pure} is really verbose (unlike missing printf/sccanf format attributes or noreturn attributes, which are rarer). Though it's not particularly useful to mark functions as pure/const when those are known inside the compilation unit or are inline. It'd be great to be able to restrict the -Wsuggest-attribute to functions whose storage isn't static because those are the functions for those it's useful (because it's likely that the prototype lives in some header to be used by external programs).
Pierre, could you add some testcase(s) please? http://gcc.gnu.org/bugs/#need
looks like with the last gcc-4.6 it's already what happens, sorry for the noise!