public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28121] New: `info variables` for `int * const x[]` gives `int * constx[1]` (no space between `const` and name)
@ 2021-07-22 13:19 swbz at conicmail dot com
  2021-07-25 14:33 ` [Bug gdb/28121] " ssbssa at sourceware dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: swbz at conicmail dot com @ 2021-07-22 13:19 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-31 15:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 13:19 [Bug gdb/28121] New: `info variables` for `int * const x[]` gives `int * constx[1]` (no space between `const` and name) swbz at conicmail dot com
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

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).