title: C conditional operator in GCC
body: <p>From "21st Century C" example 10.8</p>
  
  <pre><code>typedef struct {
  double width, height;
  } size_s;
  
  size_s width_height(char *papertype){
  return
  !strcasecmp(papertype, "A4")     ? (size_s) {.width=210, .height=297}
  : !strcasecmp(papertype, "Letter") ? (size_s) {.width=216, .height=279}
  : !strcasecmp(papertype, "Legal")  ? (size_s) {.width=216, .height=356}
                                   : (size_s) {.width=NAN, .height=NAN};
  }
  </code></pre>
  
  <p>Trying to use this style in WINAVR with GCC</p>
  
  <pre><code>    (a_t_g.value.ax &gt; xx) ? 
      { leds |= rpr;                  //roll positive red 
        leds &amp;= ~rpa;                 //clear amber
       flag |= flagrdd;                   //set the flag for any red
  }
  : (a_t_g.value.ax &lt; -xx) ?
  { leds  |= rnr;                 //roll negative red
    leds &amp;= ~rna;                 //clear amber
    flag |= flagrdd;                  //set the flag for any red
  }
  :{}
  </code></pre>
  
  <p>This results in <code>error: expected expression before '{' token</code>.</p>
  
  <p>Can GCC not handle this or am I doing something wrong?
  How does one handle the final do nothing in this style?</p>