Is this meant to compile?

Chris Lattner sabre@nondot.org
Wed Aug 20 21:01:00 GMT 2003


On Wed, 20 Aug 2003, Zack Weinberg wrote:
> > 2003-08-20-PrototypeMismatch.c:7: error: conflicting types for 'foo'
> > 2003-08-20-PrototypeMismatch.c:3: error: previous declaration of 'foo'
> >
> > Is this desired behavior?
>
> Yes.  In old-style function definitions, any argument narrower than an
> 'int' gets promoted to 'int'.  (This is not the same as the widening
> required by some ABIs for such arguments, which is transparent to the
> language.)

Ugh, ok... thanks!

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/



More information about the Gcc mailing list