Auto-generate some documentation

This commit is contained in:
Justine Tunney 2020-12-26 02:09:07 -08:00
parent 117d0111ab
commit 13437dd19b
97 changed files with 2033 additions and 661 deletions

View file

@ -12,7 +12,8 @@ __attribute__((__nonnull__(1))) void cate2(char *);
__attribute__((__section__(".data.var"))) int var2;
__attribute__((__section__(".data.var"))) int ar2[4];
int main() {
__attribute__((__force_align_arg_pointer__, __no_caller_saved_registers__)) int
main() {
int2 a;
ASSERT(64, _Alignof(int2));
ASSERT(64, _Alignof(a));

View file

@ -1,3 +1,4 @@
#include "libc/macros.h"
#include "third_party/chibicc/test/test.h"
int main() {
@ -6,6 +7,11 @@ int main() {
int x[n];
sizeof(x);
}));
ASSERT(5, ({
int n = 5;
int x[n];
ARRAYLEN(x);
}));
ASSERT((5 + 1) * (8 * 2) * 4, ({
int m = 5, n = 8;
int x[m + 1][n * 2];