* doc/extend.texi: Document optional priority argument to
[official-gcc.git] / gcc / testsuite / gcc.dg / initpri2.c
blob100027430a587642e823a0324c0c164ba81d4823
1 /* { dg-do compile { target init_priority } } */
3 /* Priorities must be in the range [0, 65535]. */
4 void c1()
5 __attribute__((constructor (-1))); /* { dg-error "priorities" } */
6 void c2()
7 __attribute__((constructor (65536))); /* { dg-error "priorities" } */
8 void d1()
9 __attribute__((destructor (-1))); /* { dg-error "priorities" } */
10 void d2()
11 __attribute__((destructor (65536))); /* { dg-error "priorities" } */
13 /* Priorities 0-100 are reserved for system libraries. */
14 void c3()
15 __attribute__((constructor (50))); /* { dg-warning "reserved" } */
16 void d3()
17 __attribute__((constructor (50))); /* { dg-warning "reserved" } */