Declarations with empty parentheses are incompatible with prototypes with ellipsis.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 3 Jun 2009 11:01:31 +0000 (11:01 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 3 Jun 2009 11:01:31 +0000 (11:01 +0000)
[r26097]

type.c

diff --git a/type.c b/type.c
index 09bbb34..0abf634 100644 (file)
--- a/type.c
+++ b/type.c
@@ -1117,14 +1117,14 @@ static bool function_types_compatible(const function_type_t *func1,
        if (cc1 != cc2)
                return false;
 
+       if (func1->variadic != func2->variadic)
+               return false;
+
        /* can parameters be compared? */
        if ((func1->unspecified_parameters && !func1->kr_style_parameters)
                        || (func2->unspecified_parameters && !func2->kr_style_parameters))
                return true;
 
-       if (func1->variadic != func2->variadic)
-               return false;
-
        /* TODO: handling of unspecified parameters not correct yet */
 
        /* all argument types must be compatible */