This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/5] add gcc/gdb interface files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]