break;
case CTF_K_SLICE:
+ /* Slices themselves have no print representation and should not appear in
+ the decl stack. */
ctf_decl_push (cd, fp, ctf_type_reference (fp, type));
- prec = CTF_PREC_BASE;
- break;
+ return;
case CTF_K_VOLATILE:
case CTF_K_CONST:
if (prec > cd->cd_qualp && prec < CTF_PREC_ARRAY)
cd->cd_qualp = prec;
- /* C array declarators are ordered inside out so prepend them. Also by
- convention qualifiers of base types precede the type specifier (e.g.
+ /* By convention qualifiers of base types precede the type specifier (e.g.
const int vs. int const) even though the two forms are equivalent. */
- if (kind == CTF_K_ARRAY || (is_qual && prec == CTF_PREC_BASE))
+ if (is_qual && prec == CTF_PREC_BASE)
ctf_list_prepend (&cd->cd_nodes[prec], cdp);
else
ctf_list_append (&cd->cd_nodes[prec], cdp);