Individual bit access in C Im not that good at C, so go easy on me, but I wanted to be able to have individual bit access in C without using a ton of functions to do bit manipulation on a uint8_t.  Tell me where I could improve upon it
#include &lt;stdio.h&gt;

#pragma pack(1)
union bit_array {
    struct {
        unsigned char b8:1, b7:1, b6:1, b5:1, b4:1, b3:1, b2:1, b1:1;
    } bits;
    unsigned char value;
};

int main() {
    // Creates char with binary value 11111111
    union bit_array test = { 1, 1, 1, 1, 1, 1, 1, 1 };

    // Displays 11111111 (255)
    printf(&quot;%u\n&quot;, test.value);

    // Sets 8th bit of binary value to 0
    // 11111111 (255) -&gt; 11111110 (254)
    test.bits.b8 = 0;

    // Displays 11111110 (254)
    printf(&quot;%u\n&quot;, test.value);
    
    return 0;
}
This code is not portable.  The order of bit-fields within a word is completely compiler-dependent, so the test that appears to work on one platform may give completely different results on another.
You have avoided a common trap of using signed 1-bit fields (which can hold values 0 and -1) - these unsigned ones are much better.
I don't think there's any need for the bits member to be named - I would use an anonymous member there.
The numbering of bits is unconventional - most programmers would expect b0 to be the least-significant bit, and b7 the most significant (corresponding to 2⁰ and 2⁷ value of those bits in integers).
The test would be better if it were self-checking - return with non-zero status if any of the expectations are not met.  For example:
int main(void)
{
    int failures = 0;

    {
        /* First test */
        union bit_array test = { {1, 1, 1, 1, 1, 1, 1, 1} };
        if (test.value != 0xFF) {
            fprintf(stderr, &quot;Test 1 expected 0xff, got %#04hhx\n&quot;, test.value);
            ++failures;
        }
    }

    {
        /* Second test */
        union bit_array test = { {1, 1, 1, 1, 1, 1, 1, 1} };
        test.bits.b8 = 0;
        if (test.value != 0xFE) {
            fprintf(stderr, &quot;Test 2 expected 0xfe, got %#04hhx\n&quot;, test.value);
            ++failures;
        }
    }

    return failures != 0;
}

We need tests of the most-significant bit, and setting as well as resetting bits.  I'll leave that as an exercise.