This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70249] New: print error float with printf


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70249

            Bug ID: 70249
           Summary: print error float with printf
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dr2d4 at live dot com
  Target Milestone: ---

Created attachment 37983
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37983&action=edit
error printf

#include <stdio.h>

int
main( void )
{
  float a = 5191;

  printf("float 1: %f\n", a);
  printf("float 2: %f\n", 1234);

  return 0;
}

// result

$ ./main

float 1: 5191.000000
float 2: 5191.000000

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]