Hi,

On Wed, Mar 11, 2015 at 11:14 AM, Jon A. Cruz <jonc at osg.samsung.com> wrote:
>
> There appears to be version requirements on compilers missing from the
> wiki. It is actually something very helpful to keep visible, and can
> keep developers from falling into various problems.
>
> As a bare minimum I can see that the project requires C99 for C
> compilation,


Regarding C99 features, I'd like to see IoTivity use designated initializers
<https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html> in its C code
far more than it already is to provide cleaner ways to initialize
structures.  The paradigm where a memset() is used to zero out the
structure and then initialize individual fields used in many places
throughout IoTivity is obviated by designated initializers.  The only
compilers that I'm aware of that don't support this 15 year old feature are
versions of Visual Studio older than 2012.

and g++ with the c++11 standard flag enabled for C++.
>
> For the C++ features, we should end up listing *which* C++11 features we
> want to use and which we want to avoid. Various versions of different
> compilers are missing some features, and have buggy implementations of
> others.
>
>
> So what are the details on our minimum required compiler versions?


For GCC, the documented
<https://www.iotivity.org/documentation/linux/getting-started> minimum is
4.6.1.  However, that compiler is fairly old (released 27 June 2011
<https://gcc.gnu.org/gcc-4.6/>).   It'd be nice to go straight to the
latest stable GCC 4.9.2, but assuming that's too big a jump for some I'd
like to at least see a jump to GCC 4.7.1 as the minimum version since it
addresses quite a few C++11 issues relative to the 4.6 series.

I've seen arguments that 4.6 is being held on to as the minimum for legacy
platform and code backward compatibility.  Given that IoTivity is still
relatively new and undergoing change, it's not clear why backward
compatibility specific to code is an issue.  Furthermore, supporting old
platforms that have buggy or incomplete support for C/C++ language features
used in IoTivity seems like a bad idea.

Is there any chance we make 4.7.1 the minimum required version of GCC for
IoTivity?

Thanks,
-Ossama
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150311/c057adbc/attachment.html>

Reply via email to