Re: Question regarding C code generation for a compound condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/07/2011 03:38 PM, Albert ARIBAUD wrote:
#include<stdio.h>

struct fields {
   char        a;
   char        b;
};


struct fields *g;

void test_function(void)
{

   if ( (g->a==0) || (g==NULL) )
   {
     g->b = 0;
     return;
   }

   g->b = 10;

   return;

}

remove g->b = 0; and see what happens.
Or compile with-fno-delete-null-pointer-checks


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux