Hi
On 15/07/2010 8:47 PM, Prof Brian Ripley wrote:
> We're working towards switching over to post-April snapshots, but we
> have 1000s of R packages to recompile.  A couple of those (so far)
> have thrown up header conflicts.
>
> Specifically for this report I used
> mingw-w64-1.0-bin_i686-mingw_20100702.zip but I first found the
> problem with a Linux cross-compiler snapshot. This is a distillation
> of a very much more complex issue involving BOOST headers.
>
> If I compile the two-line C++ file test.cpp
>
> #include<process.h>
> #include<cstdlib>
>
> with x86_64-w64-mingw32-g++ -c test.cpp I get
>
> In file included from test.cpp:2:0:
> e:/r/w64/gcc-4.5.1/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.1/cstdlib:166:11:
> error: '::_Exit' has not been declared
> e:/r/w64/gcc-4.5.1/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.1/cstdlib:204:22:
> error: '__gnu_cxx::_Exit' has not been declared
>
> This code works in the 20100405 snapshot (of 4.4.4).  I have a simple
> workaround (#include<cstdlib>  at the top of the affected files), but
> the code concerned is not mine and I don't believe that should be
> necessary.  The conflict is caused by this block of code
>
> #ifndef _CRT_TERMINATE_DEFINED
> #define _CRT_TERMINATE_DEFINED
>     void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
>     _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) 
> __MINGW_ATTRIB_NORETURN;
>
> #pragma push_macro("abort")
> #undef abort
>     void __cdecl __declspec(noreturn) abort(void);
> #pragma pop_macro("abort")
>
> #endif
>
> I'd welcome advice about the correct fix here.
>
> Brian Ripley
>

I think if you build your own compiler and then you do --disable-c99 
this problem will go away but the issue probably isn't there just 
because of c99 enabled.
I have encountered this issue on another level of software where this 
can be a header inclusion order problem or C99 get enabled problem.
I was investigating such compile problem and found that 
incompatibilities when c99 enabled when you include C headers in mixed 
fashion with C++ headers this problem tends to occur.
However, it can be simply work-around problem, or alternatively you can 
disable-c99.
But it seems you're using the compiler by the buildbot...
Maybe someone else can shed more light on this issue.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to