Copy hook causes an `incompatible-pointer-types` warning/error in GCC 14 with subclassed objects
### Description

A minimal test case:
``` nim
type
  O = object of RootObj
    val: string
  OO = object of O

proc `=copy`(dest: var O, src: O) =
    dest.val = src.val

let oo = OO(val: "hello world")
var ooCopy : OO
`=copy`(ooCopy, oo)
echo ooCopy.val
```

The custom copy hook generates approximately the following C:
``` c
N_NIMCALL(void, copyO)(O* dest, O* src) {
   ...
}
N_NIMCALL(void, copyOO)(OO* dest, OO* src) {
	copyO(&dest->Sup, src);
    ...
}
```

In GCC 14 the `copyO` call which passes an `OO` into an argument expecting `O` causes the `incompatible-pointer-types` warning/error.

You can work around with by passing `-fpermissive` but and it does work with gcc 13.2.0 without any issue but in this case I think it's a legitimate warning and worth downcasting the `src` argument so the generated code is something like:
```c
copyO(&dest->Sup, &src->Sup)
```


### Nim Version

```
Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-19
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 755307be61e4ee7b32c8354b2c303d04bdfc3a3e
active boot switches: -d:release
````

### Current Output

_No response_

### Expected Output

_No response_

### Known Workarounds

* Add `-fpermissive` on GCC 14
* Downgrade to GCC 13

### Additional Information

_No response_