Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #146082
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: error_t proposal |
| Date | 2019-09-06 21:47 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <871rwtxibp.fsf@bsb.me.uk> (permalink) |
| References | (4 earlier) <0a0905d7-2c2d-45c0-b028-9de1f98fc9e0@googlegroups.com> <lnblvxthj9.fsf@kst-u.example.com> <ff9369c1-8c4b-4eb5-a21a-24a1a836b69d@googlegroups.com> <87mufhxksn.fsf@bsb.me.uk> <ln36h9tbw6.fsf@kst-u.example.com> |
Keith Thompson <kst-u@mib.org> writes: > Ben Bacarisse <ben.usenet@bsb.me.uk> writes: >> Thiago Adams <thiago.adams@gmail.com> writes: >>> On Friday, September 6, 2019 at 3:18:44 PM UTC-3, Keith Thompson wrote: >>>> Thiago Adams writes: >>>> [...] >>>> > I am happy to have found errno_t in the C11 standard. >>>> > I will not change bool for errno_t in my current programs (because >>>> > this creates a inverse logic) but I intend to use errno_t in new >>>> > programs. >>>> >>>> Then your new programs won't compile with implementations that don't >>>> support the optional Annex K (unless you define errno_t yourself). >>> >>> When I compiled using VC++ 2019 I didn't have to add any defines >>> like #define __STDC_WANT_LIB_EXT1__ 1 to use errno_t or other. >>> I guess it is not following the standard in this case. >> >> No, that's permitted. A C11 implementation should not define these >> types etc. when __STDC_WANT_LIB_EXT1__ is defined to be 0 (at the >> appropriate time) and it should when __STDC_WANT_LIB_EXT1__ is defined >> to be 1, but the default (what happens when there is no explicit define >> for __STDC_WANT_LIB_EXT1__) is left up to the implementation. > > Right. There are three ways for an implementation to conform to C11 > with respect to Annex K: > > 1. Don't support it at all. The macro __STDC_LIB_EXT1__ is not > predefined. Defining or undefining __STDC_WANT_LIB_EXT1__ > (probably) has no effect. > > 2. Support it, but disable it by default. __STDC_LIB_EXT1__ is > predefined as 201112L. A program that uses Annex K features > must define __STDC_WANT_LIB_EXT1__ as 1. > > 3. Support it and enable it by default. __STDC_LIB_EXT1__ is > predefined as 201112L. A program that uses Annex K features > may define __STDC_WANT_LIB_EXT1__ as 1. That's clearer because it includes a reminder that the whole of Annex K is optional. <cut> >>> I tried online some compilers and they are not recognizing >>> errno_t even when I use >>> #define __STDC_WANT_LIB_EXT1__ 1 >> >> It would be helpful to see where that define is in your test case, along >> with the compiler's name and the options you used. > > If you're using gcc or clang, that's expected; neither supports Annex K. > (More precisely, the implementations I use, consisting of gcc or clang > with glibc, do not support it. I don't know whether gcc with a > different library implementation might support Annex K.) Ah. For some reason I thought that gcc + recent glibc did, but that was based on zero evidence. Obviously just a wrong thought that somehow got stuck in my head. -- Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-04 14:14 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-04 15:20 -0700
Re: error_t proposal Mateusz Viste <mateusz@wont.tell> - 2019-09-05 08:02 +0000
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 04:04 -0700
Re: error_t proposal Bruce S <bruces42@hotmail.com> - 2019-09-05 08:18 -0600
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-05 14:31 -0700
Re: error_t proposal James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-09-05 17:49 -0400
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-05 15:14 -0700
Re: error_t proposal Bruce S <bruces42@hotmail.com> - 2019-09-06 14:03 -0600
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-05 09:30 +1000
Re: error_t proposal Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-09-05 02:38 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 04:57 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 05:16 -0700
Re: error_t proposal Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-09-05 05:35 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 06:08 -0700
Re: error_t proposal Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-09-05 06:16 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 06:37 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 07:04 -0700
Re: error_t proposal Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-05 20:51 +0100
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 13:52 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-05 14:56 -0700
Re: error_t proposal William Ahern <william@25thandClement.com> - 2019-09-05 13:18 -0700
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-06 07:25 +1000
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-06 07:35 +1000
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 04:22 -0700
Re: error_t proposal scott@slp53.sl.home (Scott Lurndal) - 2019-09-05 13:59 +0000
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-06 07:10 +1000
Re: error_t proposal Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-09-05 10:01 +0000
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 04:36 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-05 14:43 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 05:01 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-06 11:18 -0700
Re: error_t proposal scott@slp53.sl.home (Scott Lurndal) - 2019-09-06 19:34 +0000
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 12:37 -0700
Re: error_t proposal Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-06 20:54 +0100
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-06 13:20 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 13:43 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-06 14:25 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 15:14 -0700
Re: error_t proposal Keith Thompson <kst-u@mib.org> - 2019-09-06 15:49 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-06 18:44 -0700
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-07 12:35 +1000
Re: error_t proposal Ike Naar <ike@sdf.lonestar.org> - 2019-09-08 20:15 +0000
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-09 09:30 +1000
Re: error_t proposal Ike Naar <ike@iceland.freeshell.org> - 2019-09-09 07:35 +0000
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-09 19:44 +1000
Re: error_t proposal scott@slp53.sl.home (Scott Lurndal) - 2019-09-09 13:58 +0000
Re: error_t proposal Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-09-10 14:24 +0000
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-11 09:22 +1000
Re: error_t proposal Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-09-10 16:48 -0700
Re: error_t proposal Clifford Heath <no.spam@please.net> - 2019-09-11 10:45 +1000
Re: error_t proposal Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-06 21:47 +0100
Re: error_t proposal jadill33@gmail.com - 2019-09-05 07:04 -0700
Re: error_t proposal Thiago Adams <thiago.adams@gmail.com> - 2019-09-05 07:36 -0700
Re: error_t proposal jadill33@gmail.com - 2019-09-05 08:43 -0700
csiph-web