From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id 2F5263858D33 for ; Mon, 26 Dec 2022 09:20:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2F5263858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-x12d.google.com with SMTP id bq39so7511635lfb.0 for ; Mon, 26 Dec 2022 01:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uDg8Q4xGH3GH77kHhTfy8jTqZveaT/3pSo5wuaC/PkY=; b=jezpMlKVOBMSqfOdS51VuXgi+ZfmO6yr192ngASND7iiHoecVzyvSuJL33T3QpOvJF eCIznf4dRNHavOikXyBwx0xpWDBiJ7IxSbkFw0g/NUbCTgVdq1FEjeEWPAk3mgyx6mR1 wi8AH+cKqk/32zsL6vJksZmWmjQvrm4fkw+oooyykYj2t2gyqt6HimXuPCJoTXGuaUQB yAu9duTxCboTurQlsTe94zTLK//8Y/yPe88qDvV1y2LwrHV91t6N9nkRvBbMiUgN8Gga l/9zvMi/cD/vR7FyHS8Tie3fHM5nwX62rRO1ABFcXcM2fEYOh5I5N/F/jYubYGh9BV+6 1iNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uDg8Q4xGH3GH77kHhTfy8jTqZveaT/3pSo5wuaC/PkY=; b=CeHMPiXfRCrjo1o018gXD4s+xshiRV3Zuzmwayko+HKDiPoqsH8sQSHMCoWPQwIq8S TrOy60ZmurkA/CWmQze8meJnFGz4ceLNrr0Vh2VZiFhaV2r6FwhjISgZJoT7EBnvvMGX ifIvOp9xDWK0m7awaZVD80RzVx3BQvgSPiZPz70226dISYa3m0wvna4k2dNmUiK1Lnzp iMGSq/HkpdpgkStlDyRaqzNkgZqBRhSZeEUMcSrJBqh95XK3R24ITz/OQA4hWDVduTua xW8zj0mwn6WlCxCTXv3gShawsD1kuAP6qnfKmijMK061JJQuxAh0iB9Ix16sIMvX/l7o Ce5g== X-Gm-Message-State: AFqh2krdEgzdLt+J5p227iYt7n9hvaAlKhVyU40rOV4xMcVR2xI9dWMU 8VBpyQz6xB6hnqd3dHU0foSHg+UewgRGCghq6vFkeXlQzq35KcDt X-Google-Smtp-Source: AMrXdXtwA7bvi3OWczlU7kJVtx/JvIXykX6mD+/Lm76DNExfmBy8Wu/ZROQTPqNGUgZ9acThJHsbl1lZAM8IqM446wk= X-Received: by 2002:a05:6512:3d28:b0:4a2:2c4b:8138 with SMTP id d40-20020a0565123d2800b004a22c4b8138mr893690lfv.14.1672046400532; Mon, 26 Dec 2022 01:20:00 -0800 (PST) MIME-Version: 1.0 References: <881e795d-34c8-0445-74cf-cb68192d2dfe@jguk.org> In-Reply-To: <881e795d-34c8-0445-74cf-cb68192d2dfe@jguk.org> From: Prathamesh Kulkarni Date: Mon, 26 Dec 2022 14:49:26 +0530 Message-ID: Subject: Re: [Bug c/108224] [PATCH] add srandom random initstate setstate To: Jonny Grant Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 26 Dec 2022 at 14:25, Jonny Grant wrote: > > > > From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001 > From: Jonathan Grant > 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", {"", ""} }, > {"malloc", {"", ""} }, > {"realloc", {"", ""} }, > + {"random", {"", ""} }, > + {"srandom", {"", ""} }, > + {"initstate", {"", ""} }, > + {"setstate", {"", ""} }, > > /* and . */ > {"memchr", {"", ""} }, 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