lkml.org 
[lkml]   [2002]   [Jan]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 25 Jan 2002 01:13:21 -0500 (EST)
FromAlexander Viro <>
SubjectRe: RFC: booleans and the kernel
On 25 Jan 2002, Xavier Bestel wrote:

> le sam 26-01-2002 Ю 00:09, Timothy Covell a Иcrit :
> > #include <stdio.h>> > > > int main()> > {> >         char x;
> > 
> >         if ( x )
> >         {
> >                 printf ("\n We got here\n");
> >         }
> >         else
> >         {
> >                 // We never get here
> >                 printf ("\n We never got here\n");
> >         }
> >         exit (0);
> > }
> > covell@xxxxxx ~>gcc -Wall foo.c
> > foo.c: In function `main':
> > foo.c:17: warning: implicit declaration of function `exit'
> 
> I'm lost. What do you want to prove ? (Al Viro would say you just want
> to show you don't know C ;)
> And why do you think you never get there ?

I suspect that our, ah, Java-loving friend doesn't realize that '\0' is
a legitimate value of type char...

BTW, he's got a funny compiler - I would expect at least a warning about
use of uninitialized variable.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:15    [from the cache]
©2003-2008