add clang
This commit is contained in:
parent
4715742aa8
commit
9a4b261179
890 changed files with 229323 additions and 20 deletions
20
05/tcc-final/tests/tests2/108_constructor.c
Normal file
20
05/tcc-final/tests/tests2/108_constructor.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
extern int write (int fd, void *buf, int len);
|
||||
|
||||
static void __attribute__ ((constructor))
|
||||
testc (void)
|
||||
{
|
||||
write (1, "constructor\n", 12);
|
||||
}
|
||||
|
||||
static void __attribute__ ((destructor))
|
||||
testd (void)
|
||||
{
|
||||
write (1, "destructor\n", 11);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
write (1, "main\n", 5);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue