From: Jonny Grant <jg@jguk.org>
To: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [Bug c/108224] [PATCH] add srandom random initstate setstate
Date: Tue, 27 Dec 2022 22:31:34 +0000 [thread overview]
Message-ID: <d70ea536-d3b4-8f23-001c-e5302b8a0142@jguk.org> (raw)
In-Reply-To: <CAAgBjMmhAeFkQb8RUNg2g7=qX8wdVKArdsceyhhM3SN6ji7AUg@mail.gmail.com>
On 26/12/2022 09:19, Prathamesh Kulkarni wrote:
> On Mon, 26 Dec 2022 at 14:25, Jonny Grant <jg@jguk.org> wrote:
>>
>>
>>
>> From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001
>> From: Jonathan Grant <jg@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 ?
Hi Prathmesh
Many thanks for your reply.
I built gcc by typing "make", I understand that is the bootstrap. I don't know about regtest, could you direct me to a guide please.
I didn't add a test; I can do that now. Is there an FAQ you can direct me to to run those tests please.
Running ‘make check-c’ now, its taking along time on gcc.c-torture.
Is there a way I can quickly run only the gcc.dg missing header tests?
BTW, do you know if a change could be made to detect dejagnu being installed?
Would be good if "make check" quickly failed if the "runtest" command from dejagnu was not found.
I needed to install these two packages. Would be good to get a hint when running ‘make check-c’
autogen dejagnu
For the files like missing-header-fixit-4.c is it sufficient to just add a file to that folder?
Cheers
Jonny
next prev parent reply other threads:[~2022-12-27 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 8:55 Jonny Grant
2022-12-26 9:19 ` Prathamesh Kulkarni
2022-12-27 22:31 ` Jonny Grant [this message]
2023-01-01 7:42 ` Prathamesh Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d70ea536-d3b4-8f23-001c-e5302b8a0142@jguk.org \
--to=jg@jguk.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=prathamesh.kulkarni@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).