https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #28 from Mark Wielaard <mark at gcc dot gnu.org> --- (In reply to Panu Matilainen from comment #26) > On main files warning on unused junk is certainly useful but static const is > commonly and deliberately used in headers (eg for arrays such as in comment > #18) and now produces unhelpful false positives. I don't think the comment #18 was meant to show a false positive, just the opposite. The example is not in an header and seems like a simple bug with misplaced #ifdef/#else statements. > Just as a random data point: out of the three projects I've so far compiled > with gcc 6 (on fedora rawhide), two have false positives from static const > arrays in headers. The other one has them by the dozen. It would be helpful to make these data points more concrete so we can all easily check the claims that these are not errors, but false positives.