public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "pedro at codesourcery dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug macros/9748] macros containing __extension__ won't run Date: Thu, 15 Jan 2009 23:39:00 -0000 [thread overview] Message-ID: <20090115233941.13105.qmail@sourceware.org> (raw) In-Reply-To: <20090115210626.9748.rearnsha@gcc.gnu.org> ------- Additional Comments From pedro at codesourcery dot com 2009-01-15 23:39 ------- Subject: Re: macros containing __extension__ won't run On Thursday 15 January 2009 21:40:25, drow at false dot org wrote: > Also on statement expressions, which is what the __extension__ marker > is for in the first place :-) IIRC, the __extensions__ marker is for enabling gnu-C-isms no matter the C dialect or e.g., if -pedantic is selected, so it's for more things, but, yeah, missed that. :-) > I don't think statement expressions are likely to be implemented in > GDB. It currently has only a C expression parser, with no support for > statements etc. Stating the obvious, you can override the checked versions in gdb expressions with: (gdb) macro define TREE_CHECK(T, CODE) (T) If wanting to retain the checking ability when called from gdb, perhaps the best would be to still override the whole TREE_CHECK macro with macro define, retaining close enough semantics. Say, add something like this and similars to gcc: const_tree gdb_tree_check (const_tree __t, int code) { if (TREE_CODE (__t) != code) tree_check_failed (__t, "<gdb>", 0, "<nofunction>", code); // or call some other variant return __t; } And this in .gdbinit: macro define TREE_CHECK(T, CODE) gdb_tree_check(T, CODE) -- http://sourceware.org/bugzilla/show_bug.cgi?id=9748 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next prev parent reply other threads:[~2009-01-15 23:39 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-01-15 21:06 [Bug macros/9748] New: " rearnsha at gcc dot gnu dot org 2009-01-15 21:30 ` [Bug macros/9748] " pedro at codesourcery dot com 2009-01-15 21:40 ` drow at false dot org 2009-01-15 23:39 ` pedro at codesourcery dot com [this message] 2009-01-16 0:05 ` tromey at redhat dot com [not found] <bug-9748-4717@http.sourceware.org/bugzilla/> 2011-06-28 9:11 ` jan.kratochvil at redhat dot com 2013-03-04 18:13 ` tromey at redhat dot com
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=20090115233941.13105.qmail@sourceware.org \ --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).