Re: [PATCH 06/22] Get rid of C-style memset initializations, use C++ style aggregates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 8 Mar 2018, at 12:42, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> 
> On Thu, Mar 08, 2018 at 05:39:48AM -0500, Frediano Ziglio wrote:
>>>> There are however still some issues:
>>>> - the syntax is using C++20 while we state we use C++11 syntax, this
>>>> is basically using C compatibility extensions. I just tried and for
>>>> instance this code is not accepted on Visual C++ 2015 (not an issue
>>>> at the moment);
>>> 
>>> No, but it is annoying. Will make that obvious in the commit log.
>>> 
>> 
>> I don't think that a comment on the log will make Visual C++
>> compile that code. Stating C++11 was the reason of this, not use too
>> advance syntax that could have problems.
> 
> For what it's worth, I'd be in favour of *not* using things newer than
> what is in c++11 (or maybe c++14), this would give some first guideline
> as to what's ok to use, and what should be avoided.

I agree.

However, we presently use gnu++11, so this is C++11 with GNU extensions.
As an extension, designated initializers have been in GCC since at least 4.7.

So do you think we should avoid GCC extensions and switch to “strict” mode?


Christophe
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]