Hasty Briefsbeta

Bilingual

Getting silly with C, part &((int*)-8)[3]

9 hours ago
  • C function definitions can exploit GCC glitches like unnamed parameters and multiple void arguments to bypass modern compiler errors.
  • Operator precedence tricks involve empty attributes, typedef rearrangements, and the dual use of && as a label address operator and Boolean AND.
  • Goto statements in C can leverage GNU extensions for computed jumps and comma operators to obscure control flow.
  • Counting and addition examples demonstrate undefined behavior with unspecified evaluation order of function parameters and zero-sized union types.
  • Zero-sized unions allow pointer arithmetic that disregards numerical operands, differing from behavior with void pointers.