summaryrefslogtreecommitdiff
path: root/src/voidc.cc
blob: 9e9c38f73b71cf81db22242f6fa0daa0e34fb4d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "memory.cc"
#include "common.cc"

static const char* SOURCE = R"(
#include <stdlib.h>

int main() {
  return EXIT_FAILURE;
}

)";
static const String SOURCE_STRING = { (u8*)SOURCE, sizeof(SOURCE) - 1 };

int main() {
  String source;
  slice_copy(heap_allocator(), &SOURCE_STRING, &source);

  slice_write(&source, stdout);
  fflush(stdout);
  
  slice_deallocate(heap_allocator(), &source);
}