Skip to content

C001 -- Codegen Error

C001 means the program passed lexing, parsing and type checking, and then IR generation or emission failed. It is an internal compiler error class: the message starts with codegen: and usually does not correspond to a mistake you can fix in the source.

What to do

  1. Re-run with structured output to capture the exact stage and message:
xiom --diagnostics=json -o app app.xi
  1. Try --emit-ir app.xi to see whether IR generation or the later emission step failed.
  2. Report it with the source file, the compiler version (xiom --version) and the JSON diagnostics, so the failure can be reproduced.

Notes

  • C001 is never expected for valid XIOM programs. If you can reduce it to a small file, that reproduction is the most useful contribution.
  • Unlimited unsafe cannot cause C001; it is not a contract or safety diagnostic.