[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] preprocessor makes attributes disappear
From: |
rain1 |
Subject: |
[Tinycc-devel] preprocessor makes attributes disappear |
Date: |
Thu, 05 Apr 2018 03:11:47 +0100 |
User-agent: |
Roundcube Webmail/1.3.3 |
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] preprocessor makes attributes disappear,
rain1 <=