Building with Clang
|
2018-09-09, 01:57
Post: #3
|
|||
|
|||
RE: Building with Clang
VLA in struct is a GCC extension, not allowed by the standard, so I suppose clang will never allow it:
https://stackoverflow.com/questions/1462...id-for-gcc https://stackoverflow.com/questions/1205...-in-struct you can use flexible array members defining the field as char name[] and add strlen(name) + 1 to: Code: new_child = zalloc ( sizeof ( *new_child ) + strlen(name) + 1 ); but sometime it will allocate less space (2 bytes, because of aligment) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Building with Clang - mtg - 2018-09-07, 16:01
RE: Building with Clang - NiKiZe - 2018-09-07, 21:58
RE: Building with Clang - sherpya - 2018-09-09 01:57
|
User(s) browsing this thread: 1 Guest(s)