mangle-ms-return-qualifiers.cpp [plain text]
void a1() {}
int a2() { return 0; }
const int a3() { return 0; }
volatile int a4() { return 0; }
const volatile int a5() { return 0; }
float a6() { return 0.0f; }
int *b1() { return 0; }
const char *b2() { return 0; }
float *b3() { return 0; }
const float *b4() { return 0; }
volatile float *b5() { return 0; }
const volatile float *b6() { return 0; }
float &b7() { return *(float*)0; }
const float &b8() { return *(float*)0; }
volatile float &b9() { return *(float*)0; }
const volatile float &b10() { return *(float*)0; }
const char** b11() { return 0; }
class A {};
A c1() { return A(); }
const A c2() { return A(); }
volatile A c3() { return A(); }
const volatile A c4() { return A(); }
const A* c5() { return 0; }
volatile A* c6() { return 0; }
const volatile A* c7() { return 0; }
A &c8() { return *(A*)0; }
const A &c9() { return *(A*)0; }
volatile A &c10() { return *(A*)0; }
const volatile A &c11() { return *(A*)0; }
template<typename T> class B {};
B<int> d1() { return B<int>(); }
B<const char*> d2() {return B<const char*>(); }
B<A> d3() {return B<A>(); }
B<A>* d4() { return 0; }
const B<A>* d5() { return 0; }
volatile B<A>* d6() { return 0; }
const volatile B<A>* d7() { return 0; }
B<A>& d8() { return *(B<A>*)0; }
const B<A>& d9() { return *(B<A>*)0; }
volatile B<A>& d10() { return *(B<A>*)0; }
const volatile B<A>& d11() { return *(B<A>*)0; }
enum Enum { DEFAULT };
Enum e1() { return DEFAULT; }
const Enum e2() { return DEFAULT; }
Enum* e3() { return 0; }
Enum& e4() { return *(Enum*)0; }
struct S {};
struct S f1() { struct S s; return s; }
const struct S f2() { struct S s; return s; }
struct S* f3() { return 0; }
const struct S* f4() { return 0; }
const volatile struct S* f5() { return 0; }
struct S& f6() { return *(struct S*)0; }
typedef int (*function_pointer)(int);
function_pointer g1() { return 0; }
const function_pointer g2() { return 0; }
function_pointer* g3() { return 0; }
const function_pointer* g4() { return 0; }