]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Fix output regression with multiple declarators.
authorNick Bowler <nbowler@draconx.ca>
Fri, 28 Jul 2023 04:22:11 +0000 (00:22 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 28 Jul 2023 04:22:11 +0000 (00:22 -0400)
It turns out that the cdecl99 program implemented the simplify command
using the undocumented behaviour of calling cdecl_declare with NULL
specifiers to output just the declarator part.

Recent changes to the library partially broke that usage by printing an
extra space in this case.  This went unnoticed as the simplify command
is only lightly tested and nothing checks its behaviour with multiple
declarators.

Fortunately it is very easy to restore the old behaviour in the library,
and to add a test case to verify this behaviour.


No differences found