This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: A TINY BUG
- To: gnu-win32 at cygnus dot com
- Subject: Re: A TINY BUG
- From: Steve Dum <steve_dum at mentorg dot com>
- Date: Mon, 06 Oct 1997 12:27:02 -0700
- cc: steve_dum at mentorg dot com
In message <34391696.27758E19@softway.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 <stdio.h>
>> 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@mentorg.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@cygnus.com" with one line of text: "help".