This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Typedefs with specific bit-sizes?


Is it possible in the current version(s) of GCC to define a variable of a
specific size, instead of using the size of another typedef or #define in a
system header file?

For instance, I want to have the following declaration (in C):

struct {
  bool test;
};

to take up the same space as if I was declaring it like:

struct {
  int test:1;
};


Similarly, is there any way to declare a variable in a function with a specific
bit-size like you can in a struct?

Thanks.
  -Byron

-- 
Byron Stanoszek                         Ph: (330) 644-3059
Systems Programmer                      Fax: (330) 644-8110
Commercial Timesharing Inc.             Email: bstanoszek@comtime.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]