standard or not?

Alexandre Oliva
Thu Jun 26 04:35:00 GMT 2003

On Jun 25, 2003, Israel Fdez Cabrera <> wrote:

> int _val : 2;

> he told me that the number after the identifier refers to the number
> of bits the variable will have. I tested this in gcc 3.2 and it
> didn't worked.

It works only for members of structs or unions, and it's a C and C++
standard feature.  If it works in other compilers for non-members,
it's an extension.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                 aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

More information about the Gcc-help mailing list