Re: how to implement this ?

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

 



On Mon, Jan 07, 2013 at 02:31:19PM +0000, Andrew Haley wrote:
> On 01/07/2013 04:46 AM, horseriver wrote:
> > hi:
> > 
> >   how to implement this assignment by MACRO?
> >   int a,b,c ;
> >   
> >   ((a==0)?b:c)=8;
> 
> This is for help with GCC, not general C coding help.
> 
> *((a==0) ? &b : &c) = 8;
> 
> But this is really horrible code.  I wouldn't do it.

thans!
  
  why gcc report that error ?
  
  gcc can translate "  ((a==0)?b:c)=8 " into if-else sentence .

  wht is the reason ?
> 
> Andrew.
> 


[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