This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Request for suggestions: xm-romp.h
On Mon, Mar 19, 2001 at 05:42:54PM +0100, Andreas Schwab wrote:
> Michael Meissner <meissner@cygnus.com> writes:
>
> |> On Fri, Mar 16, 2001 at 05:08:49PM -0800, Richard Henderson wrote:
> |> > On Fri, Mar 16, 2001 at 02:04:07PM -0800, Zack Weinberg wrote:
> |> > > #define GEN_FCN(CODE) (insn_data[(int) (CODE)].genfun)
> |> > > #else
> |> > > #define GEN_FCN(CODE) (*insn_data[(int) (CODE)].genfun)
> |> >
> |> > The former is also acceptable to ISO C. Does it cause K&R problems?
> |> > If not, maybe we can just use that always.
> |>
> |> The automatic dereference of a function pointer to function in a call context
> |> should cause K&R problems, since as I recall it was feature added by the
> |> original ANSI C document.
>
> Actually in ISO C the function pointer is not dereferenced, but rather the
> function decays to a function pointer in call context. Thus the syntax
> without the dereference operator was a natural consequence.
Yes, but what I was saying, there was an explicit vote in the original meetings
to allow that behavior (I know, since I was a member of the ANSI committee for
the first 10 1/2 years). Thus I would believe that any pre-ANSI compiler would
gag on using a pointer in the context of a function call.
--
Michael Meissner, Red Hat, Inc. (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482