Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.std.c Subject: Re: Interpretation needed Re: function prototypes (LONG) Message-ID: <12570017@hpclwjm.HP.COM> Date: 11 Jul 89 00:19:02 GMT References: <12570014@hpclscu.HP.COM> Organization: Hewlett-Packard Calif. Language Lab Lines: 35 Kathy Harris writes: > I'm still not clear on this. Is it only the "top-level" qualifier that > is to be ignored for comparisons, or all qualifiers. Only the "top-level" qualifier, as you call it. This gets into the concept of "top type", or "type category" as it is now called. (See 3.1.2.5.) I think the key statement is, "A derived type is not qualified by the qualifiers (if any) of the type from which it is derived." Page 25, line 22, 12/88 dpANS. For example, "int * const p" is a qualified type, but "const int * p" is not, if I have it right. > For example, are > the following compatible or not: > int f(const int * p); > int f(int * p); > where the 'const' qualifier applies to the 'int' not to the 'pointer'. These are *NOT* compatible. But the following *ARE* compatible: int f(int * const p); int f(int * p); I hope someone who understands "top type" will confirm my understanding on this, or straighten me out. > Kathy Harris Walter Murray Not speaking for X3J11 or Hewlett-Packard. ----------