scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <assert.h>
 2#include <signal.h>
 3#include <stdio.h>
 4#include <stdlib.h>
 5
 6/*
 7output:
 8First assert
 9Second assert, that must fail
100002-assert.c:32: assertion failed 'sizeof(i) < sizeof(c)'
11end:
12*/
13
14void
15handler(int dummy)
16{
17	_Exit(0);
18}
19
20int
21main()
22{
23	int i;
24	char c;
25
26	assert(signal(SIGABRT, handler) != SIG_ERR);
27
28	printf("First assert\n");
29	assert(sizeof(i) >= sizeof(c));
30
31	printf("Second assert, that must fail\n");
32	assert(sizeof(i) < sizeof(c));
33
34	return 0;
35}