source: tests/attr-priority.cfa @ f5dbc8d

Last change on this file since f5dbc8d 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
Line 
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
4int * store = 0p;
5
6__attribute__(( constructor(150) ))
7void ctor_store(void) {
8        store = malloc();
9}
10
11__attribute__(( destructor(150) ))
12void dtor_store(void) {
13        free(store);
14        store = 0;
15}
16
17int main(void) {
18        return 0;
19}
Note: See TracBrowser for help on using the repository browser.