Xref: utzoo comp.lang.c:27716 gnu.gcc:1539 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!murtoa.cs.mu.oz.au!viccol!timcc From: timcc@csv.viccol.edu.au Newsgroups: comp.lang.c,gnu.gcc Subject: How do I cast to "pointer to function returning int" ? Message-ID: <6090.2621f6c2@csv.viccol.edu.au> Date: 10 Apr 90 20:07:46 GMT Organization: Computer Services, Victoria College, Melbourne Lines: 29 Given the following C source: extern void bar () ; extern void blurfl () ; extern void frobjitz () ; struct foo { char *name ; int (*function) () ; } ; struct foo foo_table[] = { "bar", (int * ()) bar, "blurfl", (int * ()) blurfl, "frobjitz", (int * ()) frobjitz, } ; I get the following errors from GNU C, version 1.36: above_source:11: conversion to non-scalar type requested above_source:12: conversion to non-scalar type requested above_source:13: conversion to non-scalar type requested So how do I cast to "pointer to function returning int" ? -- Tim Cook Systems Administrator, Victoria College Computer Services parrot - n. An animal that has the ability to imitate man, but not the intelligence to refrain from doing so.