From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: gdb-patches@sources.redhat.com Subject: RFA: don't print `const' qualifier for ref types Date: Tue, 24 Apr 2001 10:46:00 -0000 Message-id: <20010424174735.914045E9CB@zwingli.cygnus.com> X-SW-Source: 2001-04/msg00221.html See the comments in the patched code for details. 2001-04-13 Jim Blandy * c-typeprint.c (c_type_print_cv_qualifier): Don't print `const' qualifier on C++ references; all references are innately const. Index: gdb/c-typeprint.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/c-typeprint.c,v retrieving revision 2.45.30.2 diff -c -r2.45.30.2 c-typeprint.c *** gdb/c-typeprint.c 2001/03/26 18:23:19 2.45.30.2 --- gdb/c-typeprint.c 2001/04/14 08:21:03 *************** *** 296,302 **** { int flag = 0; ! if (TYPE_CONST (type)) { if (need_pre_space) fprintf_filtered (stream, " "); --- 296,306 ---- { int flag = 0; ! /* 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, " ");