try
{
- type = make_cv_type (1, 0, type, NULL);
+ type = make_cv_type (1, TYPE_VOLATILE (type), type, NULL);
}
catch (const gdb_exception &except)
{
try
{
- type = make_cv_type (0, 1, type, NULL);
+ type = make_cv_type (TYPE_CONST (type), 1, type, NULL);
}
catch (const gdb_exception &except)
{
rtype = lookup_pointer_type (type);
break;
case DEMANGLE_COMPONENT_CONST:
- rtype = make_cv_type (1, 0, type, NULL);
+ rtype = make_cv_type (1, TYPE_VOLATILE (type), type, NULL);
break;
case DEMANGLE_COMPONENT_VOLATILE:
- rtype = make_cv_type (0, 1, type, NULL);
+ rtype = make_cv_type (TYPE_CONST (type), 1, type, NULL);
break;
}
}