Bug 46772 - libquadmath: Build failure - strtod: static declaration of 'strtod' follows non-static declaration
Summary: libquadmath: Build failure - strtod: static declaration of 'strtod' follows ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2010-12-02 21:26 UTC by Tobias Burnus
Modified: 2010-12-08 22:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-12-03 12:38:27


Attachments
Draft patch (502 bytes, patch)
2010-12-02 21:26 UTC, Tobias Burnus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2010-12-02 21:26:23 UTC
Created attachment 22608 [details]
Draft patch

On MinGW there is the following compiler error; cf. attachment.


/mingw/i586-pc-mingw32/sys-include -DHAVE_CONFIG_H -I. 
-I../../../gcc-trunk/libquadmath -g -O2 -MT gdtoa/dmisc.lo -MD -MP -MF 
gdtoa/.deps/dmisc.Tpo -c ../../../gcc-trunk/libquadmath/gdtoa/dmisc.c -o 
gdtoa/dmisc.o
In file included from ../../../gcc-trunk/libquadmath/gdtoa/gdtoaimp.h:186:0,
                 from ../../../gcc-trunk/libquadmath/gdtoa/dmisc.c:32:
c:/MinGW/include/stdlib.h:319:1: error: static declaration of 'strtod' 
follows non-static declaration
../../../gcc-trunk/libquadmath/gdtoa/gdtoa.h:112:15: note: previous 
declaration of 'strtod' was here
Comment 1 Kai Tietz 2010-12-03 12:38:27 UTC
Fix looks reasonable to me.
That mingw.org defines this function static is more a bug on their side.
Comment 2 Tobias Burnus 2010-12-08 15:10:29 UTC
Patch: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00664.html
Comment 3 Tobias Burnus 2010-12-08 22:35:56 UTC
Author: burnus
Date: Wed Dec  8 22:35:52 2010
New Revision: 167608

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167608
Log:
2010-12-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46772
        * gdtoa/gdtoa.h: Include stdlib.h instead of declare strtod.
        * gdtoa/gdtoaimp.h: Don't declare strtod.


Modified:
    trunk/libquadmath/ChangeLog
    trunk/libquadmath/gdtoa/gdtoa.h
    trunk/libquadmath/gdtoa/gdtoaimp.h
Comment 4 Tobias Burnus 2010-12-08 22:43:16 UTC
FIXED for GCC / libquadmath.

The "static" issue of MinGW is tracked at http://sourceforge.net/tracker/?func=detail&aid=3132404&group_id=2435&atid=102435