Re: Can anyone help : ERROR 296

From: Paul Pluzhnikov (ppluzhnikov-nsp_at_charter.net)
Date: 09/22/05


Date: Thu, 22 Sep 2005 07:16:10 -0700

ramesh.sarda@gmail.com writes:

> Error 298: "test.c", line 6 # In ANSI C bitfields must be one of 'int',
> 'signed int', or 'unsigned int' type.
> u_char field1 :4;

Did you have a question, or are you simply entertaining us with
your buggy code? Please read this:
 http://www.catb.org/~esr/faqs/smart-questions.html

> struct {
> u_char field1 :4;
> }full_of_fields;

Make that (just like compiler told you to):

struct {
      unsigned int field1 :4;
} full_of_fields;

Cheers,

-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


Relevant Pages

  • Re: Treeviews
    ... Yes, MF supports Recursion, local-storage, and MANY other extensions (so marked ... > if you have a Micro Focus cobol compiler, ... move 1 to tree-pointer ... > like wise, entry points are allowed, supported and well documented. ...
    (comp.lang.cobol)
  • Re: whats wrong with a pic ?
    ... They are just fine for an assembly programmer who is used to ... A lot of 8 and 16 bit MCU compilers don't have recursion switched on by ... While recursion is very seldom the right way to approach a problem on a small micro, the fact that recursion is not supported shows the processor is not well suited to C, since it is missing one or both of a proper return stack and a fast access data stack for local variables. ... These are not essential for making a C compiler (in the c.a.e. ...
    (comp.arch.embedded)
  • Re: Question: Overflow
    ... I know that this is probably compiler and implementation dependent and that this is a standard c discussion group but can someone point me in the right direction or just answer? ... It never reaches the printf in a because it always recurses before it gets to it, and it never reaches the printf in main because a never returns. ... I would suggest reading the chapters on recursion in your text book, including anything that mentions "mutually recursive functions" or "mutual recursion". ...
    (comp.lang.c)
  • Re: Statement on Schildt submitted to wikipedia today
    ... Walter Banks a écrit: ... maybe that's why no C compiler for it exists? ... stack, somewhere - perhaps Walter can elaborate ... > compilers recursion is aggressively handled in the data and control ...
    (comp.lang.c)
  • Re: Can we make recursive funcions "Inline" ?
    ... Can we make recursive functions inline and what will be its behavior ... what are possibilities that compiler will create inline definition ... call if the recursion goes deeper at runtime. ...
    (microsoft.public.vc.language)