Community
Participate
Working Groups
Build Identifier: M20100211-1343 When the following function types are compared using CFunctionType's isSameType, they are deemed to be not the same because their parameter lists are different lengths. void func() void func(void) The standard (6.7.5.3) says that the "special case of an unnamed parameter of type void as the only item in the list specifies that the function has no parameters". So I would argue that the implementation of isSameType is incorrect in this case. Reproducible: Always
Different to how this works in C++, in C the declaration 'void func()' means that the parameter list is unspecified, which is different from 'void func(void)' meaning that the function has an empty parameter list. For example: void f1() { f1(1); // This is ok. } void f2(void) { f2(1); // This is a compile error }