[Bug c/91554] if (!__builtin_constant_p (x)) warning_function() works in inline when x is int, not when x is void *

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 27 10:21:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91554

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-08-27
            Version|unknown                     |9.2.1
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Already the frontend (or GENERIC expression simplification) generates

;; Function thefun (null)
;; enabled by -tree-original


{
  if (1)
    {
      thefun_called_with_nonnull_arg ();
    }
  return real_thefun (a, b);

I couldn't quickly spot who does this though...


More information about the Gcc-bugs mailing list