This is the mail archive of the gcc@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]

Re: Advice on augmenting a common function interface


  In message <200008280748.AAA07412@kayak.mcgary.org>you write:
  > I will be expanding the interface to build_pointer_type to accommodate
  > bounded pointer types, but retaining the old interface for compatibility.
  > 
  > I can define the old interface in terms of the new one.  A macro:
  > 
  > 	#define build_pointer_type(TYPE) build_pointer_type_2 (POINTER_TYPE, (T
  > YPE))
  > 
  > or a one-liner function:
  >     
  > 	tree
  > 	build_pointer_type (type)
  > 	     tree type;
  > 	{
  > 	  return build_pointer_type_2 (POINTER_TYPE, type);
  > 	}
  > 
  > Macros have lower overhead, but hinder debugging.  For my part,
  > debugging convenience is more important.
  > 
  > Is there a preferred method?
I'd prefer to have a new function instead of hiding the details in a macro.

Jeff


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