[ovs-dev] empty structures on MSVC? (was: [PATCH v3 4/9] lib: Introduce u64-stats-sync.)

Ben Pfaff blp at nicira.com
Fri Mar 27 15:58:54 UTC 2015


Thanks for checking.  (That was fast!)

Daniele, maybe you should use something like this, then:

    struct u64_stats_sync {
    #ifndef __GNUC__
        int happy_compiler;
    #endif
    };

On Fri, Mar 27, 2015 at 08:55:54AM -0700, Gurucharan Shetty wrote:
> MSVC does not allow empty structures. Thank you for noticing this!
> 
> On Fri, Mar 27, 2015 at 8:25 AM, Ben Pfaff <blp at nicira.com> wrote:
> > On Fri, Mar 27, 2015 at 01:26:04PM +0000, Daniele Di Proietto wrote:
> >> +struct u64_stats_sync {
> >> +
> >> +};
> >
> > Guru, does MSVC accept empty structures?  I don't think they're
> > acceptable by the words of the C standards, but GCC and Clang allow
> > them.
> >
> > Thanks,
> >
> > Ben.



More information about the dev mailing list