{"id":22295840,"url":"https://github.com/meithecatte/cursedcc","last_synced_at":"2025-03-25T22:34:10.087Z","repository":{"id":259118481,"uuid":"713386627","full_name":"meithecatte/cursedcc","owner":"meithecatte","description":"a C compiler written in bash","archived":false,"fork":false,"pushed_at":"2024-10-26T13:40:58.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T00:41:48.407Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meithecatte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-02T12:20:22.000Z","updated_at":"2024-10-26T13:41:01.000Z","dependencies_parsed_at":"2024-10-22T22:45:49.482Z","dependency_job_id":null,"html_url":"https://github.com/meithecatte/cursedcc","commit_stats":null,"previous_names":["meithecatte/cursedcc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meithecatte%2Fcursedcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meithecatte%2Fcursedcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meithecatte%2Fcursedcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meithecatte%2Fcursedcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meithecatte","download_url":"https://codeload.github.com/meithecatte/cursedcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245555806,"owners_count":20634796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T17:43:18.795Z","updated_at":"2025-03-25T22:34:10.010Z","avatar_url":"https://github.com/meithecatte.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cursedcc\n\ncursedcc is a C compiler written in bash targeting x86\\_64 platforms\nmaking use of the System V ABI and ELF object format.\n\n## External programs used\n\n- `dirname` is used in `cc.sh` to resolve the compiler installation directory\n  and source all the other `.sh` files. I am not aware of any way of avoiding\n  calling this external program that correctly handles the case where `cc.sh`\n  itself is a symlink.\n- unless suppressed with `-c`, the system linker is called\n  (`cc` with `.o` files as arguments) to create an executable\n  after emitting the object file. In this case, `mktemp` and `rm` are also invoked\n  to handle the temporary object file.\n- unless suppressed with `-p`, the system preprocessor is called (`cpp`)\n  to preprocess the file.\n\nThe latter two are because I wanted to focus on the actual compiler first, and\nmight get replaced by bash implementations at some point if I hate myself enough.\n\n## Subset of language implemented\n\nCurrently, the compiler implements only a subset of the C language. \n\n- The only implemented type is `int`\n- Control flow\n  - [x] `if`, `else`\n  - [x] `for`, `while`, `do`-`while`\n  - [x] ternary operator `?`\n  - [x] short-circuiting binary operators `\u0026\u0026`, `||`\n  - [x] `goto`\n  - [ ] `switch`\n- Expressions\n  - [x] arithmetic and binary operators\n  - [ ] compound assignment `+=`, `*=`, etc.\n  - [ ] increment and decrement operators `++`, `--`\n- Functions\n  - [x] function declarations\n  - [x] calls to external functions\n  - [ ] `static` functions\n- File-scope variables\n  - [x] Global variables\n  - [ ] `static` variables\n  - [ ] `extern` variables\n- [ ] Local `static` variables\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeithecatte%2Fcursedcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeithecatte%2Fcursedcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeithecatte%2Fcursedcc/lists"}