patch type_to_str to handle complex function-ptr decls better
commitd6d3cf00ec37368fd885cf50191c87761e6c49e8
authorPetr Skocik <borgx.space@gmail.com>
Thu, 15 Mar 2018 23:26:16 +0000 (16 00:26 +0100)
committerMichael Matz <matz@suse.de>
Sat, 31 Mar 2018 22:38:11 +0000 (1 00:38 +0200)
treedde5f0dea1138db47bba26ac8867ab38018d8179
parentf0a25ca26397135c10b8b35d7ee532485395ab07
patch type_to_str to handle complex function-ptr decls better

Code like:

    #include <signal.h>
    int main() { _Generic(signal, int: 0); }

should fail with
    error: type 'extern void (*(int, void (*)(int)))(int)' does not match any association
not
    error: type 'extern void *(int)(int, void *(int))' does not match any association

[matz: fix formatting, fix function-to-pointer decay for operands of
_Generic, add testcase for this]
tccgen.c
tests/tests2/94_generic.c
tests/tests2/94_generic.expect