Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
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	[thread overview]
Message-ID: <20010424174735.914045E9CB@zwingli.cygnus.com> (raw)

See the comments in the patched code for details.

2001-04-13  Jim Blandy  <jimb@redhat.com>

	* 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, " ");


             reply	other threads:[~2001-04-24 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24 10:46 Jim Blandy [this message]
2001-04-24 12:28 David Taylor
2001-04-24 17:44 ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010424174735.914045E9CB@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox