From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26382 invoked by alias); 25 Jul 2014 22:04:59 -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 26336 invoked by uid 48); 25 Jul 2014 22:04:56 -0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61847] bug in gfortran runtime: digits cut off when reading floating point number Date: Fri, 25 Jul 2014 22:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_severity Message-ID: In-Reply-To: References: 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: 2014-07/txt/msg01707.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847 Jerry DeLisle changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org Severity|normal |enhancement --- Comment #17 from Jerry DeLisle --- I have a patch in the works. The idea is to query the locale at the time the Unit is connected and save the LC_NUMERIC character in the unit structure. Then, if the decimal character matches the DECIMAL_STATUS (decimal="point" or decimal="comma") active at the time of reading, change the decimal character internally to the current locale character previously saved. This way, only one call to locale is needed per unit connection, preserving efficiency. The real string will then be converted correctly, regardless of locale.