Function typedefs have any use?

Gabriel Dos Reis gdr@integrable-solutions.net
Mon Feb 7 02:53:00 GMT 2005


"Kevin P. Fleming" <kpfleming@starnetworks.us> writes:

| Gabriel Dos Reis wrote:
| 
| > But, yes, you can't use it to *define* it.  Think about how you'd
| > introduce the function parameters.
| 
| Right, so it's kind of pointless then, seeing as you have have to

I guess "pointless" is in the eye of beholder.  I've used that ability
quite a lot in some projects, where a large number of functions
sharing the same prototype has to be declared. 

| repeat the entire function prototype when you define it. It seems that
| it would be logical to support defining the function and only
| supplying the parameter names, given that their types are already
| known from it being forward-declared, but C does not have that
| ability. Too bad :-)

Care to make a concrete proposal?  There is no point in complaining
if you can't improve over the situation...

-- Gaby



More information about the Gcc-help mailing list