You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Cantor, Scott" <ca...@osu.edu> on 2017/07/06 15:04:06 UTC

Can we assume C99?

I don't know what the baseline has been for the code base, is C99 a reasonable requirement?

I need SIZE_MAX to fix some bounds checking errors, just need to know if I need to waste time on an autoconf test for it.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Can we assume C99?

Posted by "Cantor, Scott" <ca...@osu.edu>.
On 7/7/17, 3:45 AM, "Boris Kolpackov" <bo...@codesynthesis.com> wrote:

> Perhaps we should do something like this for Xerces-C++, especially if
> we plan to start migrating to C++11. In fact, this will be a great aid
> to gradual migration since we can just start using new features if they
> are available in all the supported compilers.

It's certainly workable for me but I only support a fairly limited set myself so it's hard for me to say what others might need, or be able to avoid problems, unless Travis or similar tool exists to verify the build, or we have volunteers I guess.

-- Scott



Re: Can we assume C99?

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Cantor, Scott <ca...@osu.edu> writes:

> I don't know what the baseline has been for the code base, is C99 a
> reasonable requirement?
> 
> I need SIZE_MAX to fix some bounds checking errors, just need to know
> if I need to waste time on an autoconf test for it.

My experience has been that supporting a standard (like C99 or C++98)
is pretty pointless, especially for things like C++11 and beyond: most
compilers these days only support a subset of their features. Your case
is a good example: VC is not C99-compliant but has SIZE_MAX. When it
comes to C++, VC supports features from 14 and 17 while not being fully
C++11-compliant.

So what we found works much better is to define a set of compilers and
their versions that we support -- any feature supported by all of them
is fair play.

Perhaps we should do something like this for Xerces-C++, especially if
we plan to start migrating to C++11. In fact, this will be a great aid
to gradual migration since we can just start using new features if they
are available in all the supported compilers.

Boris

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org