The order for type qualifiers in mangled names is r, V, K.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Nov 2008 14:13:34 +0000 (14:13 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Nov 2008 14:13:34 +0000 (14:13 +0000)
[r23683]

mangle.c

index 42a5745..83bbb65 100644 (file)
--- a/mangle.c
+++ b/mangle.c
@@ -96,12 +96,12 @@ static void mangle_function_type(const function_type_t *type)
 
 static void mangle_qualifiers(type_qualifiers_t qualifiers)
 {
-       if (qualifiers & TYPE_QUALIFIER_CONST)
-               obstack_1grow(&obst, 'K');
-       if (qualifiers & TYPE_QUALIFIER_VOLATILE)
-               obstack_1grow(&obst, 'V');
        if (qualifiers & TYPE_QUALIFIER_RESTRICT)
                obstack_1grow(&obst, 'r');
+       if (qualifiers & TYPE_QUALIFIER_VOLATILE)
+               obstack_1grow(&obst, 'V');
+       if (qualifiers & TYPE_QUALIFIER_CONST)
+               obstack_1grow(&obst, 'K');
 
        /* handle MS extended qualifiers? */
 }