Skip to content

Compiler: improve C native type parser#471

Open
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:c-types
Open

Compiler: improve C native type parser#471
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:c-types

Conversation

@chqrlie
Copy link
Copy Markdown
Contributor

@chqrlie chqrlie commented Mar 21, 2026

  • support function pointer type definitions

#if EXPERIMENTAL
typedef int (*FilterFn)(const Dirent*);
typedef int (*DirentCompareFn)(const Dirent**, const Dirent**);
#else
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I like seeing old C format typedefs in a .c2i file..it seems a bit weird. It looks more like C for course, but the c2i file is a C2 file, not a C file..

@chqrlie chqrlie force-pushed the c-types branch 5 times, most recently from c75f2db to 28fa806 Compare March 28, 2026 09:44
* support C function pointer type definitions
* remove USE_NATIVE_CTYPES feature as bootstrap now supports this
* remove function type definitions in stdlib.c2i and libc_dirent.c2i
* simplify c_types.c2i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants