This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: standard or not?
- From: Felix Lee <felix dot 1 at canids dot net>
- To: Israel Fdez Cabrera <israel at seg dot inf dot cu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 25 Jun 2003 15:37:29 -0700
- Subject: Re: standard or not?
A bitfield specification doesn't apply to arbitrary variables.
You need to put it inside a struct {} or a class {} definition,
something like this:
struct bar {
int _val : 2;
};
Yes, it's standard.
Israel Fdez Cabrera <israel@seg.inf.cu>:
> I saw in a friend's Visual C++ code a line like the one below
> 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.
> Is this C/C++ standard o a Micro$oft extention?