how to switch to read-only data section test mangled
Jack Howarth
howarth at bromo.med.uc.edu
Wed May 18 01:08:01 CEST 2011
The reason the braces are missing from configure are that I forgot to
double-brace them in acinclude.m4 so that they aren't eaten away by automake.
The patch below should solve this issue and allow the single braces to survive
in the generated configure.
--- acinclude.m4.orig 2011-05-17 19:03:09.000000000 -0400
+++ acinclude.m4 2011-05-17 19:03:43.000000000 -0400
@@ -1941,8 +1941,8 @@
esac
cat >conftest.c <<EOF
-extern const int foo[]; /* Suppresses C++'s suppression of foo */
-const int foo[] = {1,2,3};
+extern const int foo[[]]; /* Suppresses C++'s suppression of foo */
+const int foo[[]] = {1,2,3};
EOF
echo "Test program:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
Sorry about that ommission.
Jack
On Tue, May 17, 2011 at 06:15:59PM -0400, Jack Howarth wrote:
> The problem with llvm-gcc and gmp-5.0.2 turns out to be due to an improper
> regeneration of connfigure. The patch I sent to fix this only included an
> acinclude.m4 change which is properly applied...
>
> http://gmplib.org/list-archives/gmp-bugs/2011-April/002236.html
>
> however the regenerated configure in gmp 5.0.2 strangely ended up with
> the line...
>
> const int foo[] = {1,2,3};
>
> transformed into....
>
> const int foo = {1,2,3};
>
> This is a critical error as it produces warning in both clang....
>
> conftest.c:1:22: warning: excess elements in scalar initializer
> const int foo = { 1, 2, 3 };
> ^
> 1 warning generated.
>
> and llvm-gcc...
>
> conftest.c:1: warning: excess elements in scalar initializer
> conftest.c:1: warning: (near initialization for 'foo')
> conftest.c:1: warning: excess elements in scalar initializer
> conftest.c:1: warning: (near initialization for 'foo')
>
> More importantly this malformed test triggers the creation of a .literal4 section
> on llvm-gcc. I assume the configure was hand-edited as it should have matched the
> proper contents from acinclude.m4 in gmp-5.0.2. Can we please get this fixed
> for gmp 5.0.3?
> Jack
>
> _______________________________________________
> gmp-bugs mailing list
> gmp-bugs at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-bugs
More information about the gmp-bugs
mailing list