On Mon, 26 Dec 2022 at 14:25, Jonny Grant <j...@jguk.org> wrote:
>
>
>
> From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001
> From: Jonathan Grant <j...@jguk.org>
> Date: Sun, 25 Dec 2022 22:38:44 +0000
> Subject: [PATCH] add srandom random initstate setstate
>
> ---
>  gcc/c-family/known-headers.cc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gcc/c-family/known-headers.cc b/gcc/c-family/known-headers.cc
> index 9c256173b82..ade9fa2dcc0 100644
> --- a/gcc/c-family/known-headers.cc
> +++ b/gcc/c-family/known-headers.cc
> @@ -171,6 +171,10 @@ get_stdlib_header_for_name (const char *name, enum 
> stdlib lib)
>      {"getenv", {"<stdlib.h>", "<cstdlib>"} },
>      {"malloc", {"<stdlib.h>", "<cstdlib>"} },
>      {"realloc", {"<stdlib.h>", "<cstdlib>"} },
> +    {"random", {"<stdlib.h>", "<cstdlib>"} },
> +    {"srandom", {"<stdlib.h>", "<cstdlib>"} },
> +    {"initstate", {"<stdlib.h>", "<cstdlib>"} },
> +    {"setstate", {"<stdlib.h>", "<cstdlib>"} },
>
>      /* <string.h> and <cstring>.  */
>      {"memchr", {"<string.h>", "<cstring>"} },
Hi Jonny,
Thanks for the patch. A couple of things:
(a) Could you please add a test-case for the above symbols ? See
testsuite/gcc.dg/missing-header-fixit-4.c
for a similar example for printf.
(b) The patch is missing changelog.
I assume you've tested the patch with bootstrap+regtest ?

Thanks,
Prathamesh

> --
> 2.37.2

Reply via email to