🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #310372

Re: przekręcenie licznika w zmiennej typu int - czy to UB ?

#310372
From: Przemek Biernat
Date: Thu, 06 Oct 2022 17:04
4 lines
1997 bytes
> W każdym bądź razie już widzę że może zachodzić taka sytuacja. Jak temu zapobiegać jeśli mam duże liczby i jest takie ryzyko ?

Może trzeba zrobić modulo. Zależy od logiki.
Technical Details
Message-ID: <a77c2330-e11e-40bc-b3e6-5d4453d0133dn@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!1.us.feeder.erje.net!feeder.erje.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
References: <9fefc125-650e-496d-a385-87234f47a197n@googlegroups.com> <soogbe$6te$1@gioia.aioe.org> <8b1e1123-77c7-4cf0-ab2e-efd24958795en@googlegroups.com> <sqn2v5$1mm3$1@gioia.aioe.org> <4b1b7198-eb96-44ef-82e4-9ab0afa35473@hooterville.invalid> <srmu28$1pcc$1@gioia.aioe.org> <32a95715-60c8-46ce-b2f0-091f85e907f2@hooterville.invalid> <873625b9-59d5-4b83-a734-4efca1fdff48n@googlegroups.com>

Show Full Headers
Complete Article Headers
X-Received: by 2002:ac8:5851:0:b0:35b:ab32:3bbe with SMTP id h17-20020ac85851000000b0035bab323bbemr968447qth.175.1665075881917;        Thu, 06 Oct 2022 10:04:41 -0700 (PDT)
X-Received: by 2002:a05:6214:2302:b0:470:2d10:b6e4 with SMTP id gc2-20020a056214230200b004702d10b6e4mr930969qvb.72.1665075881613; Thu, 06 Oct 2022 10:04:41 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!1.us.feeder.erje.net!feeder.erje.net!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.c
Date: Thu, 6 Oct 2022 10:04:41 -0700 (PDT)
In-Reply-To: <873625b9-59d5-4b83-a734-4efca1fdff48n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=193.238.201.2; posting-account=JqeG5AoAAAAiFyQBrqF1gF5A1eLVPTrJ
NNTP-Posting-Host: 193.238.201.2
References: <9fefc125-650e-496d-a385-87234f47a197n@googlegroups.com> <soogbe$6te$1@gioia.aioe.org> <8b1e1123-77c7-4cf0-ab2e-efd24958795en@googlegroups.com> <sqn2v5$1mm3$1@gioia.aioe.org> <4b1b7198-eb96-44ef-82e4-9ab0afa35473@hooterville.invalid> <srmu28$1pcc$1@gioia.aioe.org> <32a95715-60c8-46ce-b2f0-091f85e907f2@hooterville.invalid> <873625b9-59d5-4b83-a734-4efca1fdff48n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a77c2330-e11e-40bc-b3e6-5d4453d0133dn@googlegroups.com>
Subject: Re: przekręcenie licznika w zmiennej typu int - czy
 to UB ?
From: Przemek Biernat <biernat.przemyslaw@gmail.com>
Injection-Date: Thu, 06 Oct 2022 17:04:41 +0000
X-Received-Bytes: 1830
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit