Builtins defined with BT_FN_INT_VAR etc. show as functions without
a prototype and trigger the warning.
gcc/c/
PR c/119950
* c-typeck.cc (convert_arguments): Check for built-in
function declaration before warning.
gcc/testsuite/
* gcc.dg/Wdeprecated-non-prototype-5.c: New test.
builtin_typetail = NULL_TREE;
}
- if (!typetail && parmnum == 0 && !TYPE_NO_NAMED_ARGS_STDARG_P (fntype))
+ if (!typetail && parmnum == 0 && !TYPE_NO_NAMED_ARGS_STDARG_P (fntype)
+ && !fndecl_built_in_p (fundecl))
{
auto_diagnostic_group d;
bool warned;
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wdeprecated-non-prototype" } */
+
+static inline
+int f (int x)
+{
+ return __builtin_constant_p (x);
+}
+
+static inline
+int g (double x)
+{
+ return __builtin_isfinite (x);
+}