Commit 20449d80 authored by Stefan Behnel's avatar Stefan Behnel

C++ const fix in test

parent 5edcceaf
/* A set of mutually incompatable return types. */ /* A set of mutually incompatable return types. */
struct short_return { const char *msg; }; struct short_return { char *msg; };
struct int_return { const char *msg; }; struct int_return { char *msg; };
struct longlong_return { const char *msg; }; struct longlong_return { char *msg; };
/* A set of overloaded methods. */ /* A set of overloaded methods. */
short_return f(short arg) { short_return f(short arg) {
short_return val; short_return val;
val.msg = "short called"; val.msg = (char*)"short called";
return val; return val;
} }
int_return f(int arg) { int_return f(int arg) {
int_return val; int_return val;
val.msg = "int called"; val.msg = (char*)"int called";
return val; return val;
} }
longlong_return f(long long arg) { longlong_return f(long long arg) {
longlong_return val; longlong_return val;
val.msg = "long long called"; val.msg = (char*)"long long called";
return val; return val;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment