OSDN Git Service

* typeck.c (build_modify_expr): The pedwarn for array assignment is
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.benjamin / 15799.C
1 // 981203 bkoz
2 // g++/15799  test1
3 // Build don't link:
4
5 /* 
6 15799.cpp: In function `void foo()':
7 15799.cpp:21: call of overloaded `sanjose({anonymous enum})' is ambiguous
8 15799.cpp:13: candidates are: sanjose::sanjose(const sanjose &) <near match>
9 15799.cpp:14:                 sanjose::sanjose(unsigned int)
10 */
11
12 typedef char int_8;
13 typedef unsigned long uint_32;
14
15 class sanjose {
16 public:
17    sanjose();
18    sanjose(const sanjose&);  
19    sanjose(int_8 value);  // ERROR -  // ERROR -
20    sanjose(uint_32 value);  // ERROR -  // ERROR -
21 };
22
23 enum { first, last};
24
25 void foo(void) {
26   sanjose obj(first); // ERROR -  // ERROR -
27 };
28
29