Re: can-be-null can-not-be-null break-instruction for better handling pointers.

2023-04-28 Thread Christopher Bazley via Gcc
Hi, I agree with you that C would benefit from a new type qualifier to indicate pointer nullability, although not with your suggestion that such a qualifier should indicate the property cannot-be-null. If you just want a syntax for declaring that a function parameter is not a null pointer, C

Re: _Optional: a type qualifier to indicate pointer nullability

2023-02-05 Thread Christopher Bazley via Gcc
On Sat, 4 Feb 2023 at 23:53, Jonathan Wakely wrote: > > > On Sat, 4 Feb 2023, 21:23 Christopher Bazley, wrote: > >> >> >> On Sat, 4 Feb 2023 at 20:40, Jonathan Wakely >> wrote: >> >>> >>> On Sat, 4 Feb 2023, 17:01 Christopher Bazley

Re: _Optional: a type qualifier to indicate pointer nullability

2023-02-04 Thread Christopher Bazley via Gcc
On Sat, 4 Feb 2023 at 20:40, Jonathan Wakely wrote: > > On Sat, 4 Feb 2023, 17:01 Christopher Bazley via Gcc, > wrote: > >> >> Does the lack of support for Clang's nullability qualifiers in GCC >> indicate >> a greater likelihood for my proposed feature

_Optional: a type qualifier to indicate pointer nullability

2023-02-04 Thread Christopher Bazley via Gcc
In August, I had an idea for a C language extension to improve null pointer safety. The tl;dr is that whereas a pointer-to-const may have undefined behaviour on write access, a pointer-to-_Optional may have undefined behaviour on read or write access. I shared this proposal with my colleagues,