public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug testsuite/25996] New: wrap global arrays in namespace Date: Fri, 15 May 2020 11:51:32 +0000 [thread overview] Message-ID: <bug-25996-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=25996 Bug ID: 25996 Summary: wrap global arrays in namespace Product: gdb Version: HEAD Status: NEW Severity: enhancement Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Created attachment 12543 --> https://sourceware.org/bugzilla/attachment.cgi?id=12543&action=edit Generate warning when test-case defines global array This ( https://sourceware.org/pipermail/gdb-patches/2020-May/168543.html ) is an example where a test-case defines a global array, which clashes with a scalar variable with the same name, defined in another test-case. The way this was fixed was by wrapping the test-case in a namespace and declaring the variable as a namespace variable using "variable". It could be a good cleanup to proactively treat all global array vars as such. I wrote a runtest.exp patch that detects test-cases that define global arrays, which gives this type of output: ... $ sed 's%/.*/gdb/testsuite/%%' build/CHECKLOG.gdb | grep WARNING WARNING: gdb.ada/info_auto_lang.exp defined global array type_in_c WARNING: gdb.ada/info_auto_lang.exp defined global array var_in_ada WARNING: gdb.ada/info_auto_lang.exp defined global array rbreak_func_in_c WARNING: gdb.ada/info_auto_lang.exp defined global array func_in_c WARNING: gdb.ada/info_auto_lang.exp defined global array type_in_ada WARNING: gdb.ada/info_auto_lang.exp defined global array rbreak_func_in_ada WARNING: gdb.ada/info_auto_lang.exp defined global array var_in_c WARNING: gdb.ada/info_auto_lang.exp defined global array func_in_ada WARNING: gdb.arch/amd64-byte.exp defined global array byte_regs WARNING: gdb.arch/amd64-dword.exp defined global array dword_regs WARNING: gdb.arch/amd64-word.exp defined global array word_regs WARNING: gdb.arch/i386-biarch-core.exp defined global array corestat WARNING: gdb.arch/i386-byte.exp defined global array byte_regs WARNING: gdb.arch/i386-word.exp defined global array word_regs ... -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2020-05-15 11:51 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-15 11:51 vries at gcc dot gnu.org [this message] 2020-05-15 12:24 ` [Bug testsuite/25996] " vries at gcc dot gnu.org 2020-05-15 12:25 ` vries at gcc dot gnu.org 2020-05-15 14:17 ` vries at gcc dot gnu.org 2020-06-12 13:44 ` vries at gcc dot gnu.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-25996-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: linkBe 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).