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 ();

Reply via email to