From: steve_dum AT mentorg DOT com (Steve Dum) Subject: Re: A TINY BUG 6 Oct 1997 12:50:48 -0700 Message-ID: <199710061927.MAA18083.cygnus.gnu-win32@sdum.wv.mentorg.com> References: <34391696 DOT 27758E19 AT softway DOT com> To: gnu-win32 AT cygnus DOT com Cc: steve_dum AT mentorg DOT com In message <34391696 DOT 27758E19 AT softway DOT com>you write: >> I have found that the following bad code gives "exception" at run >> time instead of error message at compilation time (b18 Win95): >> >> #include >> main(){ >> printf("%s\n",sizeof(long)); >> } > >No compiler will detect this error at compile-time. The prototype for >printf is (char *, ...); that is, no specific type information for Well, actually, if you compile this with a -Wall gcc will diagnose it, and emit the warning f.c:3: warning: format argument is not a pointer (arg 2) steve -------------- Stephen Dum steve_dum AT mentorg DOT com (503)-685-7743 Mentor Graphics Corp. 8005 S.W. Boeckman Rd. Wilsonville, Or 97070-7777 - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".