public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "swbz at conicmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/28121] New: `info variables` for `int * const x[]` gives `int * constx[1]` (no space between `const` and name)
Date: Thu, 22 Jul 2021 13:19:58 +0000	[thread overview]
Message-ID: <bug-28121-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28121

            Bug ID: 28121
           Summary: `info variables` for `int * const x[]` gives `int *
                    constx[1]` (no space between `const` and name)
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: swbz at conicmail dot com
  Target Milestone: ---

Steps to Reproduce:
1) C declaration: `int * const x[];`
2) Compile, run with GDB and execute GDB command `info variables`


Actual Results: `int * constx[1];` (no space between `const` and name `x`)

Expected Results: `int * const x[1];` (space between `const` and name `x`)

Environment:
* Linux 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021
x86_64 x86_64 x86_64 GNU/Linux
* Both: gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) and clang version
10.0.0-4ubuntu1
* GNU gdb (GDB) 12.0.50.20210722-git

Additional Info:

Seems to be some combination of the `const` appearing after the `*` and the
fact that this is an array. The following all output as expected:

* `int * const x;`
* `int * x[];`
* `int const x[];`

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-07-22 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 13:19 swbz at conicmail dot com [this message]
2021-07-25 14:33 ` [Bug gdb/28121] " ssbssa at sourceware dot org
2021-07-26 16:36 ` andrew.burgess at embecosm dot com
2021-07-26 17:03 ` andrew.burgess at embecosm dot com
2021-07-28  9:21 ` cvs-commit at gcc dot gnu.org
2021-07-28  9:22 ` andrew.burgess at embecosm dot com
2023-12-31 15:26 ` ssbssa at sourceware dot org

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=bug-28121-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).