Last change
on this file since c565d68 was
5ad24a2c,
checked in by Andrew Beach <ajbeach@…>, 13 months ago
|
Added test for the checks on the constructor/destructor attributes.
|
-
Property mode set to
100644
|
File size:
371 bytes
|
Rev | Line | |
---|
[5ad24a2c] | 1 | // Although we are testing the attribute priority checks, we also have a |
---|
| 2 | // resolver error to force the expect to compare against the compiler output. |
---|
| 3 | |
---|
| 4 | int * store = 0p; |
---|
| 5 | |
---|
| 6 | __attribute__(( constructor(150) )) |
---|
| 7 | void ctor_store(void) { |
---|
| 8 | store = malloc(); |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | __attribute__(( destructor(150) )) |
---|
| 12 | void dtor_store(void) { |
---|
| 13 | free(store); |
---|
| 14 | store = 0; |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | int main(void) { |
---|
| 18 | return 0; |
---|
| 19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.