[cfe-dev] ISO C3X proposal: nonnull qualifier

Dmitri Gribenko via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 1 16:39:29 PST 2021


Hi Alejandro,

On Wed, Dec 1, 2021 at 11:24 PM Alejandro Colomar (man-pages)
<alx.manpages at gmail.com> wrote:
> On 11/23/21 13:45, Dmitri Gribenko wrote:
> > If I were to speculate what would happen if C3X did flip the default,
> > I think it would be treated by the community as a language fork.
>
> Yes
>
> > Pre-C3X headers won't work correctly when included in C3X programs,
> > making incremental adoption of C3X syntax, as it was intended to be
> > used, impossible. Projects would likely invent a NULLABLE macro, which
> > would expand to _Nullable in C3X and nothing in earlier versions, to
> > enable an incremental transition.
> >
> > That's why Clang introduced the pragma, enabling new rules to be
> > adopted incrementally.
>
> Let's avoid forking C :)

Do you consider the standard pragma `#pragma STDC FENV_ACCESS` to be a
language fork? If not, why is a pragma to control nullability of
pointers different?


Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the cfe-dev mailing list