public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2
@ 2013-09-05 19:29 u.weber at gipko dot de
  2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: u.weber at gipko dot de @ 2013-09-05 19:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327

            Bug ID: 58327
           Summary: Problem of quadmath in connection with SDL2
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libquadmath
          Assignee: unassigned at gcc dot gnu.org
          Reporter: u.weber at gipko dot de

"quadmath_snprintf" gives strange results, when SDL2
(http://www.libsdl.org/download-2.0.php) is additionally included. I'm using
"MinGW" with "DevC++" or "Code::Blocks". The short program:

  extern "C" {
  #include "quadmath.h"
  }

  #include "SDL2\SDL.h"
  #include <iostream>

  int main(int argc, char* argv[])
  {  char buf[128];
     quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", 46, M_PIq);
     std::cout <<  "PI = " << (float)M_PIq << " / " << buf << std::endl;   
  }

gives the result:

PI = 3.14159 / +3.78539161562520278725e-4917

but when I delete or comment the line  // #include "SDL2\SDL.h" 
I get the expected result:

PI = 3.14159 / +3.14159265358979323846e+00

I guess this is related to Bug 51007 but I don't know how to fix this problem.
I would like to use "quadmath" and "SDL2" together.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-10 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de
2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org
2013-09-09 18:59 ` u.weber at gipko dot de
2013-09-09 19:24 ` u.weber at gipko dot de
2015-02-10 17:44 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).