Path: ...!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.advocacy Subject: Re: More Funny Stuff From Joel Date: 11 Jun 2024 18:23:28 GMT Lines: 11 Message-ID: References: <17d716103c089ab3$7951$675878$802601b3@news.usenetexpress.com> <2ej96j1mbvgiok4q5c57vdlo94itpfu5dt@4ax.com> <6664e989$0$2363151$882e4bbb@reader.netnews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net ZSFBzJDDDpLM2LG3bLX59wjpOO+ETVK8B/PbcLH06JHdJrfGnU Cancel-Lock: sha1:jiVhG0pYqcTehz/1iA8W5wXbRZM= sha256:p4PoJivn/FTGDy/4E6fuHvp8Mu+GXSCw541GeAdCbCM= User-Agent: Pan/0.149 (Bellevue; 4c157ba) Bytes: 1709 On Tue, 11 Jun 2024 08:13:31 -0400, Chris Ahlstrom wrote: > const is used to enforce certain semantics. Of course, it is not > necessary for a simple C function parameter (e.g. an int) to be const > unless one is pedantic. I can't cook up a simple example but I've hit instances using functions in legacy code where one const in a function resulted in having to spread const around to keep the compiler from whining. It's like the situations where you use const-cast in C++ to get things to play nice.