Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374097 - Drop QA warning for "array subscript is above array bounds"
Summary: Drop QA warning for "array subscript is above array bounds"
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal QA
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 04:15 UTC by Ryan Hill (RETIRED)
Modified: 2011-07-07 00:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
abovesubscript.diff (abovesubscript.diff,524 bytes, patch)
2011-07-05 04:15 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2011-07-05 04:15:55 UTC
Created attachment 279125 [details, diff]
abovesubscript.diff

There's a long history of GCC outputting bogus "array subscript is above array bounds" warnings:

http://gcc.gnu.org/PR45978
http://gcc.gnu.org/PR43949
http://gcc.gnu.org/PR47418
http://gcc.gnu.org/PR43833
http://gcc.gnu.org/PR45180
etc.

In fact building gcc-4.6.1 itself with -O2 triggers a dozen or so.  I'm filing a PR for those but I think based on this history we should drop the QA warning as it's likely to just be noise.

The related "below array bounds" warning seems to work correctly.
Comment 1 SpanKY gentoo-dev 2011-07-05 05:37:39 UTC
most of the ones i looked at were actual bugs in the code.  minor, but PR45180 does seem like a bug in the proposed test case as well (if the func doesnt return, then use __attribute__((noreturn))).

i dont feel strongly about disabling it for now.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2011-07-07 00:09:47 UTC
Heh, looks like the warnings I got building gcc are valid too.  Good enough to change my mind.