Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.std.c Subject: Re: Interpretation needed Re: function prototypes (LONG) Message-ID: <12570016@hpclscu.HP.COM> Date: 7 Jul 89 23:14:53 GMT References: <12570014@hpclscu.HP.COM> Organization: Hewlett-Packard Calif. Language Lab Lines: 31 Thanx, all, for the replies. It's a little clearer now. Dave, you're right: I was getting a little confused re: composite types and qualifiers. You see, on the one hand, section 3.1.2.6 states (third bullet) that the composite type of two function types with parameter lists is a function type with a parameter list, with the type of each parameter being the composite type of the corresponding parameters from the two function types. On the other hand, if one has a parameter of type "const int", and the other has a parameter of type "int", clearly there is no "composite type" of these two types (via sec. 3.5.3). Thus, the point to be made clear, IMO, is that the "function type" really contains an imaginary parameter list, which is identical to the parameter list with which it is declared, except that the qualifiers on the parameter types are ignored. E.g., in the function definition int foo (const int bar) { /* */ } the type of "foo" is int () (int) (my notation for: return type == int, parameter list = "int"). However, the type of "bar" is "const int". Am I off target? Maybe a slight clarification needs to be put into the standard or the rationale at some stage. ---- Shankar.