I noticed that the AC_TYPE_UINT64_T macro in autoconf 2.64 produces a
wrong results on Tru64 UNIX V4.0F with GCC 3.4.4.  The platform lacks
both stdint.h and inttypes.h, so the macro needs to provide a value
itself.

Here's the test I used:

$ cat configure.ac
AC_INIT(uint64_t, 0.0)
AC_TYPE_UINT64_T
AC_CONFIG_HEADERS(config.h)
AC_OUTPUT
$ autoconf
$ autoheader
$ ./configure
[...]
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking for uint64_t... unsigned int
configure: creating ./config.status
config.status: creating config.h

The value above is wrong: alpha-dec-osf is an LP64 platform, so this
should be unsigned long instead.

The problem is shown with the extracted testcase:

$ cat conftest.c
int
main ()
{
static int test_array [1 - 2 * !((unsigned int) -1 >> (64 - 1) == 1)];
test_array [0] = 0

  ;
  return 0;
}
$ gcc-3.4.4 -c conftest.c
conftest.c: In function `main':
conftest.c:4: warning: right shift count >= width of type
$ echo $?
0
$ gcc-4.5.0 -c conftest.c
conftest.c: In function 'main':
conftest.c:4:1: warning: right shift count >= width of type
conftest.c:4:12: error: storage size of 'test_array' isn't constant
$ echo $?
1

I'm not sure this is a problem in all versions of GCC 3.4 on that
platform or specific to the version I use, though.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Reply via email to