gdb: fix vfork with multiple threads
[deliverable/binutils-gdb.git] / libctf / ctf-decl.c
index f18ca964c9304b9280f74a1d7096fd98aaeee57d..269eca42a729f88f0f18023b8cff86764f3a3851 100644 (file)
@@ -117,9 +117,10 @@ ctf_decl_push (ctf_decl_t *cd, ctf_dict_t *fp, ctf_id_t type)
       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:
@@ -152,11 +153,10 @@ ctf_decl_push (ctf_decl_t *cd, ctf_dict_t *fp, ctf_id_t type)
   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);
This page took 0.023556 seconds and 4 git commands to generate.