Re: [PATCH]: if (cond); foo() in firewire

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steve Kargl
Date: Sunday, June 21, 2009 - 9:54 pm

On Mon, Jun 22, 2009 at 12:04:49PM +0800, Adrian Chadd wrote:

I agree with you.  Nothing like side effects to screw up 
a persons clang.

#include <stdio.h>
#include <stdlib.h>

static int
side_effect(int *i)
{
   *i = 42;
   return 0;
}

int 
main(void)
{
   int i;
   if (side_effect(&i));
   if (i == 42)
      printf("%d\n", i);
   return 0;
}

-- 
Steve
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH]: if (cond); foo() in firewire, Roman Divacky, (Sun Jun 21, 1:20 am)
Re: [PATCH]: if (cond); foo() in firewire, Gary Jennejohn, (Sun Jun 21, 9:23 am)
Re: [PATCH]: if (cond); foo() in firewire, Adrian Chadd, (Sun Jun 21, 9:04 pm)
Re: [PATCH]: if (cond); foo() in firewire, Steve Kargl, (Sun Jun 21, 9:54 pm)
Re: [PATCH]: if (cond); foo() in firewire, Andriy Gapon, (Mon Jun 22, 4:20 am)
Re: [PATCH]: if (cond); foo() in firewire, Adrian Chadd, (Mon Jun 22, 4:10 pm)
Re: [PATCH]: if (cond); foo() in firewire, Andriy Gapon, (Mon Jun 22, 4:27 pm)
Re: [PATCH]: if (cond); foo() in firewire, Roman Divacky, (Tue Jun 23, 1:57 am)
Re: [PATCH]: if (cond); foo() in firewire, Jung-uk Kim, (Tue Jun 23, 10:26 am)