ImportC: Should this compile?

bachmeier no at spam.net
Sat Dec 18 22:31:38 UTC 2021


I've been trying to get the stb header library to compile. 
There's a single remaining failure:

```
typedef struct
{
    unsigned char c[4];
} stb_easy_font_color;
stb_easy_font_color c = { 255,255,255,255 }; // use structure 
copying to avoid needing depending on memcpy()
```

LDC returns

```
stb_easy_font.c(892): Error: 3 extra initializer(s) for `struct 
__tag21`
```

Is this a bug in ImportC or is it correct that it doesn't 
compile? What's the best way to fix it while keeping the same 
behavior and performance? (I don't know what struct __tag21 is. 
It's not anywhere in the source. Assuming that's just a bad error 
message.)


More information about the Digitalmars-d-learn mailing list