Re: Variable declaration followed by colon?



What does this represent?
unsigned int n : 6;

Inside a structure or union, it represents an unsigned integral
bitfield that occupies 6 bits;
Outside a structure or union, it represents a syntax error.
Have fun.

.



Relevant Pages

  • Re: Unions Redux
    ... pointer casting. ... union U {double a; unsigned int b;} u; ... valid and aliasing rules don't work here. ...
    (comp.lang.c)
  • [PATCH] netfilter endian regressions
    ... struct xt_connlimit_info { ... unsigned int limit, inverse; ... union nf_conntrack_man_proto ... static inline bool already_closed ...
    (Linux-Kernel)
  • Re: Undefined behavior - 2 queries
    ... suitable-selected unsigned int to access all the bits within a float. ... optimization affect the access of float representation through a union ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)
  • [PATCH 13/19] dmaengine: add support for dma xor zero sum operations
    ... unsigned int src_off, size_t len, unsigned long flags); ... union dmaengine_addr dest, unsigned int dest_off, ... DMA channel to offload zero sum to ...
    (Linux-Kernel)
  • Re: Unions Redux
    ... memcpy(&b, &a, sizeof b); ... union U {double a; unsigned int b;} u; ... valid and aliasing rules don't work here. ...
    (comp.lang.c)