From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19469 invoked by alias); 5 Sep 2013 19:29:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19446 invoked by uid 48); 5 Sep 2013 19:29:18 -0000 From: "u.weber at gipko dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 Date: Thu, 05 Sep 2013 19:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libquadmath X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: u.weber at gipko dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg00296.txt.bz2 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 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.