__attribute__ ((mode (XX))) incorrectly determined by autoconf.

Vincent Lefevre vincent at vinc17.org
Tue Jun 23 13:49:38 CEST 2009


Hi,

On 2009-06-23 14:48:49 +0400, Andreev Konstantin wrote:
> Autoconf script incorrectly determines working "__attribute__ ((mode
> (SI)))" for "SunStudio Express 2009/03" compiler:
> 
> [andreev at jabba gmp-4.3.1]$ cc -V
> cc: Sun Ceres C 5.10 SunOS_i386 2009/03/06
> [andreev at jabba gmp-4.3.1]$ echo 'typedef int SItype __attribute__ ((mode (SI)));' >test.c
> [andreev at jabba gmp-4.3.1]$ cc -c test.c
> "test.c", line 1: warning:  attribute "mode" is unknown, ignored
> "test.c", line 1: warning: attribute parameter "SI" is undefined
> [andreev at jabba gmp-4.3.1]$ echo $?
> 0
> 
> I suppose, in your acinclude.m4 you should use the same technique for "__attribute__ ((mode (SI)))" as for "__attribute__ ((malloc))" to detect warning about ignored attribute.

Do you mean

  gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
  if AC_TRY_EVAL(gmp_compile); then
  [...]

instead of AC_TRY_COMPILE?

Note that MPFR would be affected too since it uses the same method
as GMP.

Regards,

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list