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


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> Another possibility would be to give the macros twice as many arguments
Jakub> as there are parameters and just through the odd arguments away when
Jakub> expanding to the template parameters.  That would mean you write
Jakub> GCC_METHOD7 (gcc_decl, build_decl,
Jakub> 	     const char *, name,
Jakub> 	     enum gcc_c_symbol_kind, sym_kind,
Jakub> 	     const char *, substitution_name,
Jakub> 	     gcc_address, address,
Jakub> 	     const char *, filename,
Jakub> 	     unsigned int, line_number);
Jakub> though it isn't very nice either, guess I'm bikeshedding... ;)

Bikeshed away, I don't mind ... in this case :)

I'm not super fond of this idea, though, I think because the names are
all "useless" -- they don't have any meaning to any of the actual uses,
they are just there for documentation purposes.

One other random idea was something like:

GCC_METHOD7 (gcc_decl, build_decl,
             const char *,             /* Argument NAME.  */
             enum gcc_c_symbol_kind,   /* Argument SYM_KIND.  */
...

Tom


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