From the Comp-Cert release notes - sanity in C programming. Someone call ISO and complain.

"Constant propagation: optimize "known integer or undefined" results. For example, &x == &x, which is either 1 or undefined, is now replaced by 1"

#wg14 #Clanguage #undefinedbehavior #software

GitHub - mierenhoop/picomemo: Portable OMEMO implementation in C.

Portable OMEMO implementation in C. Contribute to mierenhoop/picomemo development by creating an account on GitHub.

GitHub
I just learned that juxtaposition of string constants in #C results in string concatenation. inttypes.h uses it, on my system.

#include <stdio.h>

void main() {
printf("Hello, " "world!\n");
}
#CLang #CLanguage #programming
Finalmente pubblicato questo compilatore C scritto in JavaScript da Claude (interpreta il linguaggio e crea eseguibili per Windows). Potete trovarlo su GitHub in versione open source GPLv3. Si cercano beta testers per scovare gli errori fatti da Claude! #claudeai #clanguage #compilerdesign https://www.youtube.com/watch?v=-qe50sqx4jY
Compilatore C in JavaScript / Claude AI

YouTube
#introduction #intro #programming #bugbounty #clanguage #golang #rust
Hacker and programmer born in the 60s. I program in C, Go and Rust at home for fun and personal use. I use Arch Linux with Gnome. I like experimenting with the Linux kernel on my computer and with Android on my phones. I snoop around looking for bugs on websites and applications.
What if #C had a function like alloclen which returned the length of a memory allocation? That could simplify some parameter-passing!
#CLanguage

C's "undefined behavior" was designed for flexibility, but it's become a critical vulnerability. From `volatile` access to signed integer overflow, compilers exploit UB to optimize away entire code blocks, causing silent, catastrophic failures. Dive deep into the problem and explore safer alternatives like Rust and Zig for robust software.

https://www.tpp.blog/1kky7tm

#technology #clanguage #undefinedbehavior

🤖 This post was AI-generated.

Logarithmic-time string-to-enum lookup using only standard C library functions: https://godbolt.org/z/6aaxehzf5
#cprogramminglanguage #clanguage
Compiler Explorer - C

typedef enum { THING_INVALID = -1, #define THING(X) THING_ ## X, //#include "thingdefs.h" // start of thingdefs.h #ifndef THING #error "Missing function-like macro definition" #endif THING(apple) THING(banana) THING(orange) #undef THING // end of thingdefs.h } thing_t; static const char *const dict[] = { #define THING(X) #X, //#include "thingdefs.h" // start of thingdefs.h #ifndef THING #error "Missing function-like macro definition" #endif THING(apple) THING(banana) THING(orange) #undef THING // end of thingdefs.h }; static int compare_strings(const void *const key, const void *const elemp) { assert(key); assert(elemp); const char *const *const stringp = elemp; return strcmp(key, *stringp); } thing_t string_to_id(const char *const key) { char const *prev = ""; for (size_t i = 0; i < _Countof dict; ++i) { char const *const elem = dict[i]; assert(strcmp(prev, elem) < 0); prev = elem; } (void)prev; const char *const *const elemp = bsearch(key, dict, _Countof dict, sizeof dict[0], compare_strings); if (elemp) { return (thing_t)(elemp - dict); } else { return THING_INVALID; } } int main(const int argc, const char *const argv[const static argc + 1]) { for (size_t i = 0; i < argc; ++i) { thing_t const t = string_to_id(argv[i]); switch (t) { case THING_apple: puts("Crunch!"); break; case THING_banana: puts("Squish!"); break; case THING_orange: puts("Splatter!"); break; case THING_INVALID: fputs("Invalid argument", stderr); break; } } return 0; }

Continuano gli esperimenti con Claude AI. Creare un interprete di linguaggio C e anche un compilatore/linker per Windows sono alla portata di Claude Sonnet 4.6 in versione gratuita? Scopriamolo assieme in questo video! #clanguage #artificialintelligence #claudeai #compiler #interpreter #x86 https://www.youtube.com/watch?v=zHHHjynC8Zg
Sfida per Claude: Interprete e Compilatore C nel browser / Linguaggio C

YouTube

[LINGUAGEM C] LAB 4 - Layout de memória e compilação

https://bolha.tube/w/riGbu9tN1UHc9NN8C3BYxe

[LINGUAGEM C] LAB 4 - Layout de memória e compilação

PeerTube