This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/59934] Bootstrap fail since r206941: expmed.h:252:33: error: array subscript is above array bounds
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 Jan 2014 05:01:51 +0000
- Subject: [Bug bootstrap/59934] Bootstrap fail since r206941: expmed.h:252:33: error: array subscript is above array bounds
- Auto-submitted: auto-generated
- References: <bug-59934-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59934
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-01-25
Ever confirmed|0 |1
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> ---
The amount of overhead is, umm, so little to be in the noise.
We end up turning one arithmetic & return/branch into 3 immediate loads and a
call on a path that's so cold it should never matter.
Your solution returns a bogus value for those conditions. That should never
happen, but if it does, returning a value that may then be mis-interpreted/used
by the caller just seems like a problem waiting to happen.
WRT --disable-checking making the warning come back, that's easy enough to fix.
Instead of gcc_assert, we just do make it look like an old fashioned abort:
if (cant_happen)
abort ();