Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: error_t proposal Date: Fri, 06 Sep 2019 14:25:17 -0700 Organization: None to speak of Lines: 31 Message-ID: References: <5d03868d-22f7-4c7f-9f9b-1e70d8d8e6f2@googlegroups.com> <270b0679-c176-4e05-9d18-6dc6dcbdb75a@googlegroups.com> <0a0905d7-2c2d-45c0-b028-9de1f98fc9e0@googlegroups.com> <87mufhxksn.fsf@bsb.me.uk> <4b1b8896-4fa9-4904-a1dc-ef5a0cb0459b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="bdc446bce191e4e891bf0ef7ae57c831"; logging-data="5500"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+LU/IKHxd/1zkcGgSlxWyn" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ynckU++RXzfPBO8YxZirtywwi9E= sha1:DcNEDfhGYVA4uO77rPrFtRbj3Zg= Xref: csiph.com comp.lang.c:146083 Thiago Adams writes: > On Friday, September 6, 2019 at 5:20:33 PM UTC-3, Keith Thompson wrote: [...] >> Right. There are three ways for an implementation to conform to C11 >> with respect to Annex K: >> [details snipped] > > Visual C++ is not defining __STDC_LIB_EXT1__. > In case I need to create my own header I will have to check by > compiler. If you mean Visual C++ used as a C++ compiler, I wouldn't expect it to; C++ hasn't copied that feature from C. If you mean Visual C++ used as a C compiler, I don't believe it supports C11 (or even all of C99). If you want to define your own error type, I suggest *not* calling it "errno_t" as C11 Annex K does. Support for Annex K is not widespread, and it's been proposed for removal in the next edition. I like the idea of a consistent error reporting convention for library functions, but existing and widely used libraries are *not* consistent, and that's not going to change any time soon. What is the intended scope of your proposal? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */