FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.benjamin / 15756-1.C
blobcc44e6a74a079788ba8ba81c781a34be51fc29fb
1 // 981203 bkoz
2 // g++/15756  test1
3 // Build don't link: 
4 // Special g++ Options: -Wsign-promo
6 enum e_value { first = 0, next = 30 };
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);
15 extern void mod_enum(e_value*);
16 extern int a;
18 void foo(void) {
19   e_value mod = first;
20   mod_enum(&mod);
21   if (mod != next)
22     ++a;