In article 
<1a172248-8aab-42f0-a8a2-3f00168f9...@u13g2000vbo.googlegroups.com>,
 Keith H Duggar <dug...@alum.mit.edu> wrote:

> On Sep 29, 9:01 pm, RG <rnospa...@flownet.com> wrote:
> > That the problem is "elsewhere in the program" ought to be small
> > comfort.  But very well, try this instead:
> >
> > [...@mighty:~]$ cat foo.c
> > #include <stdio.h>
> >
> > int maximum(int a, int b) { return a > b ? a : b; }
> >
> > int main() {
> >   long x = 8589934592;
> >   printf("Max of %ld and 1 is %d\n", x, maximum(x,1));
> >   return 0;}
> >
> > [...@mighty:~]$ gcc -Wall foo.c
> > [...@mighty:~]$ ./a.out
> > Max of 8589934592 and 1 is 1
> 
> $ gcc -Wconversion -Werror foo.c
> cc1: warnings being treated as errors
> foo.c: In function 'main':
> foo.c:5: warning: passing argument 1 of 'maximum' with different width
> due to prototype
> 
> It's called "learning to compile".

It's called "being late for the game."  This has already been raised and 
addressed.  Read the rest of the thread.

rg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to