Is "__value" a gcc extension, and if so, what does it do? Does it have a VC ++ equivalent?

advertisements

Title says it all.

I am trying to use some of the libraries from cygwin's gcc with visual studio's C++ compiler but the following code from C:\cygwin\usr\include\sys\_types.h does not compile:

#ifndef __mbstate_t_defined
/* Conversion state information.  */
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    unsigned char __wchb[4];
  } __value;        /* Value so far.  */
} _mbstate_t;
#endif

Build Output:

1>c:\cygwin\usr\include\sys\_types.h(74): error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
1>c:\cygwin\usr\include\sys\_types.h(74): error C2059: syntax error : '__value'

Visual Studio seems to be interpreting this as some sort of CLR extension


Is __value a gcc extension, and if so, what does it do? Does it have a VC++ equivalent?

It's the other way around. It's a keyword in VC++ but not in gcc.

In gcc, it's just an identifier.