On Sun, Apr 15, 2018 at 02:32:14PM +0200, Dominique Pellé wrote:
> Bram Moolenaar <b...@moolenaar.net> wrote:
> 
> > Hello Vimmers,
> >
> > For a long time Vim code was made to be compiled with ANSI C (also known
> > as C89 and ISO C90).  This means it can also be compiled on very old
> > systems.  And since it wasn't too much work to support it, that was the
> > choice.
> >
> > Now that we are adding checks for C89 compliance, it turns out that we
> > already are using some C99 features, such as the "long long" type.
> > Also, many libraries produce warnings when enforcing C89.  That means
> > using C89 is starting to become a hassle.  So, the question comes up: is
> > it still worth it?
> >
> > If you CANNOT build Vim with a C99 compiler, please speak up!
> > If I don't hear about such cases, I think we are better off using C99 as
> > the standard.
> >
> > Note that if we go with C99, we still need to decide what features we
> > will actually use, since C99 compliance was lacking for quite a while
> > (esp. in MS-Visual C).  That's not going to make this easier.
> 
> I would welcome C99.
> 
> gcc-4.5 has full support of C99, but many C99 features
> were supported much earlier than that, see [1].
> 
> It's less clear to me when C99 features were introduced
> in Visual studio. C99 support was lagging in Visual Studio.

Visual Studio doesn't fully support C99.  It supports the subset of C99
that overlaps with C++, as well as changes that could be implemented in
the standard library (i.e., didn't require compiler changes).
https://stackoverflow.com/q/9610747/198244 is a useful reference.

That will probably be enough for what Vim (and its dependencies) need.

> I just thought about C99 a few days ago, when I saw a colleague
> having a crash with vim, because he did not compile it with
> -D_FORTIFY_SOURCE=1. The ugly compilation option won't
> be needed with C99,

That would certainly be welcome.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui