
"Niels Möller" wrote:
Are you saying that one has to use -fexceptions also when compiling the files that are written in C? That's news to me, but I'm mostly ignorant when it comes to C++ exceptions.
Yes: for exceptions to be propagated correctly, C files must be compiled with -fexceptions.
Perhaps you meant
CFLAGS=-fexceptions && ./configure && make
but this is also a very bad idea in GMP 3.1.1 (the current release), since `-fexceptions' will _replace_ any other compilation option so that a good portion of the nice work done by the configure script is simply lost. In other words, on the machine I am using this very moment, I would compile GMP with `-fexceptions' instead of `-g -O -fomit-frame-pointer -mcpu=pentiumpro', and these
Sorry for the typo. I meant
CXXFLAGS=-fexceptions ./configure && make
I.e. CXXFLAGS should be set in _configure's_ environment, but not in _make's_. If that doesn't work, it could be considered a bug in the configure script.
Sorry also on my part: I copied and pasted your typo but I did try the right thing. To summarize, if I do (copying and pasting what I have just redone on my machine)
CFLAGS=-fexceptions /usr/local/distrib/gmp-3.1.1/configure
I override all the other compilation flags: I get `-fexceptions' and not `-g -O -fomit-frame-pointer -mcpu=pentiumpro'. If assigning to CFLAGS was meant to _add_ to the compilation flags, then this is a bug in the configure script. In some projects of mine I use configure options like --with-extra-cflags for that purpose. All the best,
Roberto