Open
Description
Bugzilla Link | 40147 |
Version | trunk |
OS | All |
CC | @pascal-cuoq,@hfinkel,@zygoloid |
Extended Description
Test case (prog.c):
int main()
{
typedef const int t();
typedef int t();
}
Compilation command line:
clang prog.c -Wall -Wextra -std=c11 -pedantic-errors
Observed behaviour:
The following error message was outputed:
error: typedef redefinition with different types ('int ()' vs
'const int ()') typedef int t();
Expected behaviour:
No error message. Both typedefs should define t to be of type 'int ()' since
function types never have qualified return types.
Standard references:
6.7.6.3.5
Note:
gcc does not give any errors for the program.