Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!hpcc01!hpcuhb!hpcllla!hpcllca!walter From: walter@hpcllca.HP.COM (Walter Murray) Newsgroups: comp.lang.c Subject: Re: VAX C Doesn't care about prototypes. Message-ID: <7330027@hpcllca.HP.COM> Date: 23 Jul 90 16:48:00 GMT References: <1990Jul20.184748.4362@lotus.com> Organization: Hewlett Packard Calif. Language Lab Lines: 25 Karl Heuer writs: > In article <1990Jul20.184748.4362@lotus.com> blambert@lotus.UUCP (Brian Lambert) writes: >>void x(B *b); >> A a; >> x(&a); /* does not generate a warning */ > File a bug report. The arguments are *not* assignment compatible. > "3.3.4 Conversions that involve pointers (other than as permitted by the > constraints of 3.3.16.1) shall be specified by means of an explicit cast." > I think this should have been under Constraints rather than Semantics; as it > stands, the diagnostic appears to be optional. I don't think the diagnostic is optional. The code above violates this CONSTRAINT from 3.3.2.2: "Each argument shall have a type such that its value may be assigned to an object with the unqualified version of the type of its corresponding parameter." It's a moot point, of course, if the compiler doesn't claim to conform to the standard. Walter Murray ----------