1 // g++ 1.37.1 bug 900324_06 2 3 // g++ is unable to use context information (i.e. the required type of the 4 // expression) to disambiguate a possibly overloaded function name when that 5 // name is used as either the second or the third operand of a ?: operator. 6 7 // It is also unable to use the fact that the given name is not in fact 8 // overloaded (and has only one possible interpretation). 9 10 // This results in improper errors being generated. 11 12 // keywords: overloading, function pointers, disambiguation, operator?: 13 14 int i; 15 void (*p)(); 16 17 void function_0 () 18 { 19 } 20 21 void function_1 () 22 { 23 p = i ? function_0 : 0; // gets bogus error 24 p = i ? 0 : function_0; // gets bogus error 25 p = i ? function_1 : function_0; // gets bogus error 26 } 27 28 int main () { return 0; } 29