Question: Say I have a struct defined somewhere deep in low-level code used all over the place in the most crazy and unknown ways:

```
struct T {
    unsigned short name_len;
    char d_name[LENGTH];
}

```

With accompanying functions that fill d\_name with whatever needs to be put there, like

```
struct T* fill( somethingOrOther* X)

```

And I would like to extend the old struct+function to include a new variable:

```
struct T {
    unsigned short name_len;
    char d_name[LENGTH];
    unsigned short type_len;
    char d_type;
}

```

and the new version of the function would also fill the d\_type variable with useful things.

Would this type of change break the API? Couldn't I just use the new T instead of the old T, and additionally access the new members?

Answer: 
It might make sense to extend your structs like this:

```
struct newT {
    struct T t;
    int newElement;
    ...
}

```

Then you can safely use a newT pointer as a T pointer; the C standard guarantees that there is no padding before the first element of a struct.
Yes- when you use an opaque pointer like that, then it is irrelevant of the contents. As long as your users only ever used the opaque pointers, you can muck around with the struct and it's implementation all you like.