Re: Function typedefs have any use?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Kevin P. Fleming" <kpfleming@xxxxxxxxxxxxxxx> writes:

| Eljay Love-Jensen wrote:
| 
| > But the syntax of C doesn't have the language construct of "here's a
| > label (identifier), here's the type of that label, and here's it's
| > body".
| 
| Yeah, that's what I figured.
| 
| > So, no, you'll have to do it "the hard way".
| 
| Agreed. Seems like a rather illogical oversight to be able to able to
| define a "type" for a function but not actually be able to declare
| functions of that "type" (except as pointers to them), but that's
| we've got.

You mean like this:

      typedef int F(int);
      F f;      /* function "f" taking an int and returning an int. */

?

-- Gaby

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux