Should this cause a diagnostic?

David R. Conrad davidc at terminus.umd.edu
Sat Feb 6 04:51:52 AEST 1988


I have a question relating to prototyping and parameter passing for those
people who have access to the ANSI draft.  Should the following program
generate a diagnostic (warning perhaps) about inconsistent parameters?

/*------------------------------------------------------------------------*/

#define LINT_ARGS
#include <stdio.h>

unsigned int foo( unsigned goo );

unsigned int foo( goo )
unsigned int goo;
{
    (void) printf( "%u\n", goo );
    return( goo );
}

main(){
    unsigned char doo = 0;
    
    (void) foo( doo );
    return( 0 );
}

/*------------------------------------------------------------------------*/

If not, why not?  Please reply to me directly, too much bandwidth on this
newsgroup for me to keep up...

Thanks,

-drc
-------------------------------------------------------------------------------
David R. Conrad      The University of Maryland       arpa: davidc at umd5.umd.edu
(301) 454-2946              PC/IP Group             bitnet: conradd at umdd.bitnet



More information about the Comp.lang.c mailing list