Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qInNC-0006Ug-Hl for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jul 2023 09:40:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qInNB-0007qA-EJ for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jul 2023 09:40:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qInNB-0007q0-1P for pgsql-hackers@lists.postgresql.org; Mon, 10 Jul 2023 09:40:01 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qInN3-003FuX-WD for pgsql-hackers@postgresql.org; Mon, 10 Jul 2023 09:40:00 +0000 Received: from [192.168.28.131] (unknown [192.168.28.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: s.shinderuk@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 0B725E20E5C; Mon, 10 Jul 2023 12:39:52 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1688981993; bh=eRG8SAM0u/CzltkiPkFiSpY1NZe1afUEa8bg1waA224=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=V8fjgvj0pkj9KLWGiLpOKZV17a6zLz67v401ZrwyJ8QZoClKjeEcda0MawdCe1pB2 l9iDYZpzSfxWxFdy4ZkaI660TtlLXZalrU7zY1OVrCSfLAMOQeObZu6vMIT5XsdQVy e6i4dZvM85lawXYitE71Uy0XBzwDYJqnm8m+Uv+XkDZhVFjPrx9+XVmIHLWNPWKeh+ 5CLxFD6p9EkPZPzKR3yuxs39NRzqU32yF8WhmJb510BzUqQpE0c01ik9C0k+iCAOC1 GF7x4hkPIJZanhZ8/83fIwLbUwOHqpQ2uudcN4I6qefHEVhipj1pRat7UGhhip+WlE SBaONIiQA6UzQ== Message-ID: <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru> Date: Mon, 10 Jul 2023 12:39:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: gcc -Wclobbered in PostgresMain Content-Language: en-US To: Tom Lane Cc: PostgreSQL Hackers References: <2eda015b-7dff-47fd-d5e2-f1a9899b90a6@postgrespro.ru> <1632266.1688829082@sss.pgh.pa.us> From: Sergey Shinderuk In-Reply-To: <1632266.1688829082@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, Tom, On 08.07.2023 18:11, Tom Lane wrote: > What we ought to be doing is resetting these two flags > after the disable_all_timeouts call. Oops, I missed that. > Having done that, it wouldn't really be necessary to mark these > as volatile. I kept that marking anyway for consistency with > send_ready_for_query, but perhaps we shouldn't? I don't know. Maybe marking them volatile is more future proof. Not sure. >> I also moved firstchar's declaration inside the loop where it's used, to >> make it clear that this variable needn't be volatile and is not >> preserved after longjmp(). > > Good idea, but then why not the same for input_message? It's fully > reinitialized each time through the loop, too. Yeah, that's better. > In short, something like the attached, except I'm not totally sold > on changing the volatility of the timeout flags. Looks good to me. Thank you. -- Sergey Shinderuk https://postgrespro.com/