This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Parma Polyhedra Library 0.11.1
- From: Dongsheng Song <dongsheng dot song at gmail dot com>
- To: Roberto Bagnara <bagnara at cs dot unipr dot it>
- Cc: gcc-graphite <gcc-graphite at googlegroups dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, mingw64 <mingw-w64-public at lists dot sourceforge dot net>, "The Parma Polyhedra Library developers' list" <ppl-devel at cs dot unipr dot it>, Kai Tietz <ktietz70 at googlemail dot com>
- Date: Tue, 22 Feb 2011 22:20:24 +0800
- Subject: Re: Parma Polyhedra Library 0.11.1
- References: <4D61502E.10903@cs.unipr.it> <AANLkTin9+D4YMA+h5y1bBxppTy8AsaM2ktOTZb0LrYEK@mail.gmail.com> <4D637C4D.1060600@cs.unipr.it>
On Tue, Feb 22, 2011 at 17:05, Roberto Bagnara <bagnara@cs.unipr.it> wrote:
> On 02/22/2011 06:04 AM, Dongsheng Song wrote:
>>
>> When I build on i686-w64-mingw32 target:
>>
>> libtool: compile: Âi686-w64-mingw32-g++ -DHAVE_CONFIG_H -I.
>> -I/home/oracle/src/ppl-0.11.1/src -I.. -I..
>> -I/home/oracle/src/ppl-0.11.1/src
>> -I/home/oracle/tmp/gcc-4.5-windows-obj/misc//include -g -O2
>> -frounding-math -march=x86-64 -O2 -flto -pipe -D_WIN32 -W -Wall -MT
>> fpu-ia32.lo -MD -MP -MF .deps/fpu-ia32.Tpo -c
>> /home/oracle/src/ppl-0.11.1/src/fpu-ia32.cc Â-DDLL_EXPORT -DPIC -o
>> .libs/fpu-ia32.o
>> /home/oracle/src/ppl-0.11.1/src/fpu-ia32.cc: In function 'void
>> Parma_Polyhedra_Library::detect_sse_unit()':
>> /home/oracle/src/ppl-0.11.1/src/fpu-ia32.cc:52:7: error: 'NULL' was
>> not declared in this scope
>> make[3]: *** [fpu-ia32.lo] Error 1
>> make[3]: Leaving directory `/tmp/x/src'
>> make[2]: *** [all] Error 2
>> make[2]: Leaving directory `/tmp/x/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/tmp/x'
>> make: *** [all] Error 2
>>
>> Here is my patch:
>>
>> $ git diff src/fpu-ia32.cc
>> diff --git a/src/fpu-ia32.cc b/src/fpu-ia32.cc
>> index d361411..8a2a6a2 100644
>> --- a/src/fpu-ia32.cc
>> +++ b/src/fpu-ia32.cc
>> @@ -30,6 +30,7 @@ site: http://www.cs.unipr.it/ppl/ . */
>> Â#include "fpu.defs.hh"
>> Â#include<csetjmp>
>> Â#include<csignal>
>> +#include<cstddef>
>>
>> Ânamespace {
>>
>
> Hi Dongsheng,
>
> I don't see any occurrences of NULL in fpu-ia32.cc.
> Perhaps this is a bug in the <csetjmp> or related header file
> in your system?
>
When I use gcc 4.5 (version 4.5.3 20110221) with mingw-w64 trunk,
after preprocessing, setjmp(env) extend to _setjmp3((env), NULL) .
When I use gcc 4.6 (version 4.6.0 20110221) with mingw-w64 trunk,
after preprocessing, setjmp(env) extend to _setjmp3((env), __null) .
So gcc 4.5 run into trouble, but gcc 4.6 OK.
I don't know why and how to fix in GCC or mingw-w64, but just add
one line '#include<cstddef>' in the source is the simplest way.
--
Dongsheng