Date: Tue, 6 Oct 1998 21:31:24 +0100 (BST) From: George Foot To: Uhfgood cc: djgpp AT delorie DOT com Subject: Re: Another silly question! In-Reply-To: <19981006122045.25193.00007641@ng117.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On 6 Oct 1998, Uhfgood wrote: > Hey... consider the following function : > > jerk( ) > { > printf("Bill is a jerk.\n"); > } > > How come I don't get any prototyping warnings or errors when > I compile this? It compiles fine... no warnings or nothin' Do you mean that you expect to get a warning about implicit declaration of `printf' (since you didn't #include ) or that you expect to get a warning about your function being defined without a prototype? AFAIK gcc never warns about defining a function without first giving a prototype. It does warn about calling an unprototyped function before its declaration, if you turn on (almost) all warnings by passing `-Wall'. It will also warn that you didn't specify a return type, and so `int' is assumed, and it will then warn that you didn't return a value. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html