Whoops, forgot to commit this yesterday:
[deliverable/binutils-gdb.git] / gdb / c-typeprint.c
index 2cd9e3e3fc16530e324542094bba5f28f3fc8623..789d5f0b2df0594e2e62b2e9b8dd6016f195201a 100644 (file)
@@ -29,8 +29,6 @@
 #include "value.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "command.h"
-#include "gdbcmd.h"
 #include "language.h"
 #include "demangle.h"
 #include "c-lang.h"
@@ -296,7 +294,11 @@ c_type_print_cv_qualifier (struct type *type, struct ui_file *stream,
 {
   int flag = 0;
 
-  if (TYPE_CONST (type))
+  /* We don't print `const' qualifiers for references --- since all
+     operators affect the thing referenced, not the reference itself,
+     every reference is `const'.  */
+  if (TYPE_CONST (type)
+      && TYPE_CODE (type) != TYPE_CODE_REF)
     {
       if (need_pre_space)
        fprintf_filtered (stream, " ");
This page took 0.02352 seconds and 4 git commands to generate.