Use an initializer list:
U_U32_F u = { 0xffffffff };
You can set other members than the first one via
U_U32_F u = { .f = 42.0 };
More Related Contents:
- What happens to a declared, uninitialized variable in C? Does it have a value?
- Variable definition inside switch statement
- Assign multiple values to array in C
- What is the difference between a definition and a declaration?
- How to initialize all members of an array to the same value?
- Error “initializer element is not constant” when trying to initialize variable with const
- What will be the value of uninitialized variable? [duplicate]
- Where you can and cannot declare new variables in C?
- How does an uninitiliazed variable get a garbage value?
- “error: assignment to expression with array type error” when I assign a struct field (C)
- Array Type – Rules for assignment/use as function parameter
- C struct initialization using labels. It works, but how?
- What is a designated initializer in C?
- Is un-initialized integer always default to 0 in c?
- No compiler error when fixed size char array is initialized without enough room for null terminator
- Why can’t we initialize members inside a structure?
- gcc, strict-aliasing, and casting through a union
- initializing an array of ints
- Complex declarations
- In C, why can’t I assign a string to a char array after it’s declared?
- Default values in a C Struct
- What does “request for member ‘*******’ in something not a structure or union” mean?
- C multiple single line declarations
- Anonymous union within struct not in c99?
- C char array initialization: what happens if there are less characters in the string literal than the array size?
- How to initialize a pointer to a struct in C?
- Union element alignment
- Why does static initialization of flexible array member work?
- Detecting mismatched array enum initializers
- Uninitialized variable in C [duplicate]