From: Nick Bowler Date: Thu, 6 Jul 2023 05:59:43 +0000 (-0400) Subject: libcdecl: Remove "too many parentheses" error check. X-Git-Tag: v1.3~130 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/c733aff6d0b2b107c88e37a1491f270db0634819?hp=c733aff6d0b2b107c88e37a1491f270db0634819 libcdecl: Remove "too many parentheses" error check. It is simply not the case that "int ((int))" is invalid. Since "int (x(int))" declares x as a function returning int, it follows that "int ((int))" is simply a type name for function returning int. Likewise, "int (((int)))" is equivalent, etc. Rejecting these type names is longstanding broken behaviour. I think the entire error check can simply be deleted outright, along with its associated error message. The bogus negative test cases are replaced with new positive tests. Furthermore, rewrite the big comment that suggests this was reasonable behaviour, replacing it with a (hopefully) better explanation that covers how this particular case should be interpreted. ---