paul-j-lucas / cdecl

Composing and deciphering C (or C++) declarations or casts, aka ‘‘gibberish.’’
GNU General Public License v3.0
90 stars 11 forks source link

--west-decl=t for "pointer to const pointer to ..." has no effect #37

Closed paul-j-lucas closed 4 months ago

paul-j-lucas commented 4 months ago

Run-time Issue

What was the input given to cdecl?

c++decl --west-decl=t 'declare p as pointer to const pointer to int'

What output did you expect to be given by cdecl?

int* const* p;

What output was actually given by cdecl?

int *const *p;

Additional Comments

For:

c++decl --west-decl=t 'declare p as pointer to pointer to int'

you correctly get:

int** p;

but when you insert const for the second pointer, --west-decl=t has no effect, i.e., the *'s are "east."

paul-j-lucas commented 4 months ago

Fixed.