tree ARG_UNUSED (args), int ARG_UNUSED (flags),
bool * ARG_UNUSED (no_add_attrs))
{
- /* Ensure we have a function type, with no arguments. */
- gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE && ! TYPE_ARG_TYPES (*node));
+ tree params;
+
+ /* Ensure we have a function type. */
+ gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE);
+
+ params = TYPE_ARG_TYPES (*node);
+ while (params && ! VOID_TYPE_P (TREE_VALUE (params)))
+ params = TREE_CHAIN (params);
+
+ /* Ensure we have a variadic function. */
+ gcc_assert (!params);
return NULL_TREE;
}
if (both_p)
/* ??? This is normally further controlled by command-line options
like -fno-builtin, but we don't have them for Ada. */
- add_builtin_function (libname, libtype, fncode, fnclass,
- NULL, fnattrs);
+ add_builtin_function (libname, libtype, fncode, fnclass,
+ NULL, fnattrs);
built_in_decls[(int) fncode] = decl;
if (implicit_p)