OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.benjamin / 15756-1.C
1 // { dg-do assemble  }
2 // { dg-options "-Wsign-promo" }
3 // 981203 bkoz
4 // g++/15756  test1
5
6 enum e_value { first = 0, next = 30 };
7
8 struct sanjuan {
9   sanjuan(int value);
10   sanjuan(unsigned value);
11   friend sanjuan operator&(const sanjuan& x, const sanjuan& y);
12   friend int operator!=(const sanjuan& x, const sanjuan& y);
13 };
14
15 extern void mod_enum(e_value*);
16 extern int a;
17
18 void foo(void) {
19   e_value mod = first;
20   mod_enum(&mod);
21   if (mod != next)
22     ++a;
23 }
24
25
26
27
28
29
30
31
32
33
34
35
36