implemented the __builtin_va_list type #140
Conversation
| typedef int wchar_t; | ||
| typedef unsigned int size_t; | ||
| typedef int ssize_t; | ||
| //typedef int ssize_t; |
There was a problem hiding this comment.
this should probably not be taken into effect.
9d55495 to
03c5d0a
Compare
|
|
||
| typedef int* va_list; | ||
| //typedef int* va_list; | ||
| typedef __builtin_va_list va_list; |
There was a problem hiding this comment.
Internally it is now assumed that va_list is an int pointer. Can we solve support for __builtin_va_list differently? Maybe as a pre-processor define resolving to int*? What would make this simpler. Where is __builtin_va_list used in musl? Maybe there is a pre-processor hook there as well?
There was a problem hiding this comment.
This confuses me wasn't va_list before an int pointer. The current implementation of __builtin__va__* in ppci is forcing a pointer to int upon whatever variable it uses as va_list. The best implementation would be, as i did, to implement va_list as its own type which is __builtin__va__list, as you can see i have removed the line 4. which makes va_list a type __builtin_va_list and not an int pointer.
There was a problem hiding this comment.
Cool approach! Never thought of it, thanks!
The __builtin_va_list type was previously just a int*. Now it is its own type (generic pointer). The unit tests pass.