Hi! On Thu, Jun 17, 2021 at 10:19:04AM -0500, Bill Schmidt wrote: > 2021-06-15 Bill Schmidt <wschm...@linux.ibm.com> > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. > (TYPE_MAP_SIZE): New macro. > (type_map): New initialized variable. > (map_token_to_type_node): New function. > (write_type_node): Likewise. > (write_fntype_init): Implement.
> +/* Look up TOK in the type map and return the corresponding string used > + to build the type node. */ There is a standard "bsearch" function ;-) > + /* Avoid side effects of strtok on the original string by using a copy. */ > + char *buf = (char *) malloc (strlen (str) + 1); > + strcpy (buf, str); libiberty has xstrdup (and it can also be done using your new best friend asprintf of course ;-) ) Okay for trunk with or without such improvements. Thanks! Segher