diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-03 20:40:18 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-03 20:40:18 +0900 |
| commit | 1d7cd873dff0ee54aa41434c8b001a5cd467dc3c (patch) | |
| tree | 88c0a73206b5b81731e86d668ecb3ed2f7b6df16 /src | |
| parent | 980d73ce25b116e645b16e9ed37dcf55fdffad7a (diff) | |
| download | ducc-1d7cd873dff0ee54aa41434c8b001a5cd467dc3c.tar.gz ducc-1d7cd873dff0ee54aa41434c8b001a5cd467dc3c.tar.zst ducc-1d7cd873dff0ee54aa41434c8b001a5cd467dc3c.zip | |
feat: add --std=c23
Diffstat (limited to 'src')
| -rw-r--r-- | src/cli.c | 2 | ||||
| -rw-r--r-- | src/common.h | 4 | ||||
| -rw-r--r-- | src/std.h | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -39,6 +39,8 @@ CliArgs* parse_cli_args(int argc, char** argv) { } else if (strcmp(argv[i], "--version") == 0) { print_version(); exit(0); + } else if (strcmp(argv[i], "--std=c23") == 0) { + // ignore --std=c23 } else { fatal_error("unknown option: %s", argv[i]); } diff --git a/src/common.h b/src/common.h index 4bd4c17..332b61d 100644 --- a/src/common.h +++ b/src/common.h @@ -5,7 +5,11 @@ _Noreturn void fatal_error(const char* msg, ...); +// TODO +#ifdef __ducc__ #define unreachable() fatal_error("%s:%d: unreachable", __FILE__, __LINE__) +#endif + #define unimplemented() fatal_error("%s:%d: unimplemented", __FILE__, __LINE__) bool str_ends_with(const char* s, const char* suffix); @@ -16,7 +16,7 @@ int fclose(FILE*); int fprintf(FILE*, const char*, ...); char* fgets(char*, int, FILE*); FILE* fopen(const char*, const char*); -int getchar(void); +int getchar(); int isalnum(int); int isalpha(int); int isdigit(int); |
