This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Advice on augmenting a common function interface
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: Advice on augmenting a common function interface
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 28 Aug 2000 16:30:27 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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