Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "...the value becomes,indeterminate each time the declaration is reached" Date: Thu, 14 Feb 2019 14:19:53 -0800 Organization: None to speak of Lines: 25 Message-ID: References: <5c51d4fb.236542547@news.xmission.com> <20190201132441.0b099e5f38fdb72371bc44f0@g{oogle}mail.com> <2Ud9E.1326702$kk4.460444@fx36.am4> <1fd600e8-fe39-4196-bc84-6a0d8f856a10@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="7abae82b86b742dc3dc12a67ad2e28f4"; logging-data="3745"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yR9RF72iaiXtuY3YkdCGB" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:69GMfFHv5p/pCeWNxI1AKFRsNsE= sha1:zxnXvQe7fvdddXccsqQVoXKxwy0= Xref: csiph.com comp.lang.c:141053 Öö Tiib writes: > On Thursday, 14 February 2019 15:18:01 UTC+2, Bart wrote: >> This is a real example: >> >> const unsigned char *py = nj.comp[0].pixels; >> const unsigned char *pcb = nj.comp[1].pixels; >> const unsigned char *pcr = nj.comp[2].pixels; > > That doesn't pass code review in C projects I've > participated this century since coding standards always > required to use "uint8_t" instead of "unsigned char". uint8_t, if it exists, is guaranteed to be an 8-bit unsigned type. (It does exist on almost all implementations that support C99 or later.) unsigned char is guaranteed to be exactly one byte. Do your coding standards not recognize that the possibility that you might sometimes *want* to manipulate bytes? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */