[Bug c/49143] New: make -Wsuggest-attribute less verbose

madcoder at debian dot org gcc-bugzilla@gcc.gnu.org
Tue May 24 16:29:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49143

           Summary: make -Wsuggest-attribute less verbose
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: madcoder@debian.org


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).



More information about the Gcc-bugs mailing list