This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/5] add gcc/gdb interface files
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Jun 2014 21:30:39 +0200
- Subject: Re: [PATCH 4/5] add gcc/gdb interface files
- Authentication-results: sourceware.org; auth=none
- References: <1400254001-12038-1-git-send-email-tromey at redhat dot com> <1400254001-12038-5-git-send-email-tromey at redhat dot com> <537DF2F5 dot 4030009 at redhat dot com> <20140522131635 dot GE10386 at tucnak dot redhat dot com> <874n009zpa dot fsf at fleche dot redhat dot com> <5390C3B9 dot 5090807 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 05, 2014 at 01:23:37PM -0600, Jeff Law wrote:
> >>>+GCC_METHOD7 (gcc_decl, build_decl,
> >>>+ const char */* name */,
> >>>+ enum gcc_c_symbol_kind /* sym_kind */,
> >>>+ gcc_type /* sym_type */,
> >>>+ const char */* substitution_name */,
> >>>+ gcc_address /* address */,
> >>>+ const char */* filename */,
> >>>+ unsigned int /* line_number */)
>
> [ OK, not entirely true, when looking at diffs a trailing whitespace
> gets colorized, so I tend not to have those leak through in my own
> patches anymore. ]
Another possibility would be to give the macros twice as many arguments
as there are parameters and just through the odd arguments away when
expanding to the template parameters. That would mean you write
GCC_METHOD7 (gcc_decl, build_decl,
const char *, name,
enum gcc_c_symbol_kind, sym_kind,
const char *, substitution_name,
gcc_address, address,
const char *, filename,
unsigned int, line_number);
though it isn't very nice either, guess I'm bikeshedding... ;)
Jakub