title: va_arg(argp, float) is crashing
body: <p>I'm trying to write custom printf function. </p>
  
  <pre><code>void debug_print(const char *fmt, ...)
  {
      const char *p;
      va_list argp;
      int i;
      double f;
      char *s;
      char fmtbuf[80];
  
      va_start(argp, fmt);
  
      for(p = fmt; *p != '\0'; p++)
      {
          if(*p != '%')
          {
              uart_putchar(*p);
              continue;
          }
  
          switch(*++p)
          {
              case 'c':
                          ...
              break;
  
              case 'f':
              f = va_arg(argp, float); // ??????
              s = dtostrf(f, 10, 6, fmtbuf);
              uart_puts(s);
              break;
  
  ...
  // then in the main part of the program
  debug_print("%f", 123.456);
  </code></pre>
  
  <p>When program comes to f = va_arg(argp, float) it never returns from that line. If I change it to f = va_arg(argp, double) it returns 0.</p>
  
  <p>Tried both on device(ATMega328P) and Atmel Studio 6 simulator, same result.</p>
  
  <p>Sounds like something to do with linker options?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Now just need to find out why <code>va_arg(argp, double)</code> returns 0.</p>