title: How to print/convert decimal floating point values in GCC?
body: <p>The GCC docs describe <a href="http://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html#Decimal-Float" rel="nofollow noreferrer">limited decimal floating point support</a> in recent GCCs.</p>
  
  <p>But how do I actually use it?</p>
  
  <p>For example on Fedora 18, GCC 4.7.2.</p>
  
  <p>A simple C program like</p>
  
  <pre><code>int main()
  {
      _Decimal64 x = 0.10dd;
      return 0;
  }
  </code></pre>
  
  <p>compiles (when using -std=gnu99) - but how do I actually do other useful stuff - like printing _Decimal64 values or converting strings to _Decimal64 values?</p>
  
  <p>The docs talk about 'a separate C library implementation' for (I assume) things like printf - which additional library do I have to use for - say - printing the result of a decimal floating point computation?</p>
  
  <p>I've tried</p>
  
  <pre><code>printf("%Df\n", x);
  </code></pre>
  
  <p>which did not work - printf just produced: <code>%Df</code>.</p>