Hello!

I made this test program which I expect to print all 0's, but it doesn't.

I noticed that after tcc -E the attributes have all disappeared.

Any idea what is stopping this from working? the attribute is documented and code gen seems to respect TOK_ALIGNED. I wasn't able to understand how it vanishes by looking at tccpp.c so advice would be welcome.

--

#include <stdio.h>
#include <stdint.h>

void f(void) __attribute__((aligned (8))) {}
void g(void) __attribute__((aligned (8))) {}
void h(void) __attribute__((aligned (8))) {}

int main(void) {
#define CHK(f) printf("%d\n", ((uint64_t)f) & 0b111)
CHK(main);
CHK(f);
CHK(g);
CHK(h);
return 0;
}

--

output:

2
3
0
5

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to