]> Git Repo - binutils.git/blobdiff - libctf/ctf-decl.c
libctf, ld: prohibit getting the size or alignment of forwards
[binutils.git] / libctf / ctf-decl.c
index faf421e47655c69766fd876d9d45347b0f248bc5..232ff5d71c04b26afff1c2d00a97def47a21730d 100644 (file)
@@ -1,5 +1,5 @@
 /* C declarator syntax glue.
-   Copyright (C) 2019-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This file is part of libctf.
 
@@ -72,7 +72,7 @@ ctf_decl_fini (ctf_decl_t *cd)
 }
 
 void
-ctf_decl_push (ctf_decl_t *cd, ctf_file_t *fp, ctf_id_t type)
+ctf_decl_push (ctf_decl_t *cd, ctf_dict_t *fp, ctf_id_t type)
 {
   ctf_decl_node_t *cdp;
   ctf_decl_prec_t prec;
@@ -152,11 +152,10 @@ ctf_decl_push (ctf_decl_t *cd, ctf_file_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.032612 seconds and 4 git commands to generate.