Category : ambiguous-grammar

Consider using foo = int; struct A { typedef A (foo)(); }; GCC and ICC accept the snippet, while Clang and MSVC reject it. Clang’s error message is <source>:4:15: error: function cannot return function type ‘void ()’ typedef A (foo)(); ^ <source>:4:13: error: typedef name must be an identifier typedef A (foo)(); ^ 2 errors ..

Read more