Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #100817
| From | jacobnavia <jacob@jacob.remcomp.fr> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Automatic null checks |
| Date | 2017-01-01 22:39 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <o4bsrh$ns0$1@dont-email.me> (permalink) |
| References | <a12ea453-3855-4ae0-a469-5d4a7e13de33@googlegroups.com> <9f2bc2b7-ddb9-49d3-ae85-b23141cbefb4@googlegroups.com> |
Le 01/01/2017 à 19:16, Thiago Adams a écrit :
> On Sunday, January 1, 2017 at 3:53:30 PM UTC-2, Thiago Adams wrote:
> [...]
>> I have more qualifiers with similar properties,
>> but I think it's better to see each one individually
>> because the subject can grown.
>>
>> These qualifiers that are 'path-sensible' or 'path-dependent '
>> opens the door in the type system for many other cas
>
> One more 'path-dependent qualifier' is '_uninitialized'
>
> void X_Init(X * _uninitialized x);
>
> X x;
>
> X_Init(&x); //ok
>
> X_Init(&x); //error
>
>
> I think the sample is easy to understand.
> The _uninitialized qualifier tells us that the previous
> state of the variable cannot be used. But we can
> assign the variable.
>
> int _uninitialized i;
>
> if (i != 0) //error
> {
> }
>
> i = 1;
>
> if (i != 0) //ok now I is 'initialized'
> {
> }
>
> int i = 1; // 'initialized' (auto-propagation)
> int i; // _uninitialized (auto-propagation)
>
>
>
>
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-01 09:53 -0800
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-01 10:16 -0800
Re: Automatic null checks Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-01 19:26 +0000
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-02 05:56 -0800
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-02 08:26 -0800
Re: Automatic null checks jacobnavia <jacob@jacob.remcomp.fr> - 2017-01-01 22:39 +0100
Re: Automatic null checks supercat@casperkitty.com - 2017-01-01 14:24 -0800
Re: Automatic null checks Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-01 23:00 +0000
Re: Automatic null checks supercat@casperkitty.com - 2017-01-01 16:42 -0800
Re: Automatic null checks Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-02 02:08 +0000
Re: Automatic null checks supercat@casperkitty.com - 2017-01-02 09:38 -0800
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-02 10:25 -0800
Re: Automatic null checks Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-02 18:48 +0000
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-02 07:45 -0800
Re: Automatic null checks Les Cargill <lcargill99@comcast.com> - 2017-01-03 07:11 -0600
Re: Automatic null checks Thiago Adams <thiago.adams@gmail.com> - 2017-01-03 17:43 -0800
csiph-web