History

extend test 03_struct for attr. __cleanup__

Udo committed 6 years ago

Commit a9e7fe11 parent 89b3cf02 files · +12 −3Browse files

Unified · Split

2 files
  1. tests/tests2/03_struct.c +10 −3
  2. tests/tests2/03_struct.expect +2 −0
tests/tests2/03_struct.c+10−3
@@ -1,6 +1,13 @@
1#include <stdio.h>1extern int printf(const char*, ...);
2 2
3struct fred3struct fred;
4
5void fred$(struct fred* this)
6{
7 printf("~fred()\n");
8}
9
10struct __attribute__((__cleanup__(fred$))) fred
4{11{
5 int boris;12 int boris;
6 int natasha;13 int natasha;
@@ -8,7 +15,7 @@ struct fred · 1 unmodified line
8 15
9int main()16int main()
10{17{
11 struct fred bloggs;18 struct fred __attribute__((__cleanup__(fred$))) bloggs;
12 19
13 bloggs.boris = 12;20 bloggs.boris = 12;
14 bloggs.natasha = 34;21 bloggs.natasha = 34;
tests/tests2/03_struct.expect+2−0
@@ -1,6 +1,8 @@
103_struct.c:14: warning: attribute '__cleanup__' ignored on type
112212
234334
312412
434534
556656
678778
8~fred()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t