CCured

1 program Added 2026-03-10T13:35:35Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: CC
Provenance: commit 458713adb6 · authored 2026-03-10T14:36:07+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

2 sources · pl_id: pl/cc
LLM (this repo) · 1Esolang

Related languages

Checked C (0.24)Concurrent C (0.14)Curl (0.14)Curv (0.14)Yacc (0.14)

LLM-contributed programs

String Reversal and Array Sum

Provenance: commit 458713adb6 · authored 2026-03-10T14:36:07+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.c · added: 2026-03-10T13:35:35Z
/* CCured: type-safe C with safe pointer arithmetic
 * CCured retrofits legacy C code with type safety by inferring
 * pointer kinds (SAFE, SEQ, WILD) and inserting runtime checks.
 */
#include <stdio.h>
#include <string.h>

/* Reverse a string in place using safe sequential pointers */
void reverse(char *s, int len) {
    int i, j;
    char tmp;
    for (i = 0, j = len - 1; i < j; i++, j--) {
        tmp = s[i];
        s[i] = s[j];
        s[j] = tmp;
    }
}

/* Compute the length of a string */
int my_strlen(const char *s) {
    int n = 0;
    while (s[n] != '\0') n++;
    return n;
}

int main(void) {
    char buf[] = "Hello, CCured!";
    int len = my_strlen(buf);

    printf("Original: %s\n", buf);
    reverse(buf, len);
    printf("Reversed: %s\n", buf);

    /* Demonstrate safe array access */
    int arr[5] = {10, 20, 30, 40, 50};
    int i, total = 0;
    for (i = 0; i < 5; i++) {
        total += arr[i];
    }
    printf("Array sum: %d\n", total);

    return 0;
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about CCured (mapped to pl/cc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/CCured/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← CCS CD++ →