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

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Bah, I should have thought about this.  The following will fix it, I'll
properly test it and submit a patch later this week.

diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 1766a256633..a96d15fef1d 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -9116,9 +9116,10 @@ warn_for_abs (location_t loc, tree fndecl, tree arg)
      -Wint-conversion warnings.  Most other wrong types hopefully lead to type
      mismatch errors.  TODO: Think about what to do with FIXED_POINT_TYPE_P
      types and possibly other exotic types.  */
-  if (!INTEGRAL_TYPE_P (atype)
-      && !SCALAR_FLOAT_TYPE_P (atype)
-      && TREE_CODE (atype) != COMPLEX_TYPE)
+  if ((!INTEGRAL_TYPE_P (atype)
+       && !SCALAR_FLOAT_TYPE_P (atype)
+       && TREE_CODE (atype) != COMPLEX_TYPE)
+      || !TYPE_ARG_TYPES (TREE_TYPE (fndecl)))
     return;

   enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl);

Reply via email to