[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible problem with AC_CHECK_TYPES
From: |
Peter Eisentraut |
Subject: |
Possible problem with AC_CHECK_TYPES |
Date: |
Sat, 31 May 2003 12:44:31 +0200 (CEST) |
A configure.in contains a test for 'union semun':
AC_CHECK_TYPES([union semun], [], [],
[#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>])
This generates in essence the following code:
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
int
main()
{
if ((union semun *) 0)
return 0;
if (sizeof (union semun))
return 0;
return 0;
}
Using "Intel(R) C++ Compiler for 32-bit applications, Version 7.1" (which
also serves as a C compiler), this only draws a warning, not an error, if
'union semun' doesn't exist:
config.c(8): warning #279: controlling expression is constant
if ((union semun *) 0)
^
config.c(11): warning #70: incomplete type is not allowed
if (sizeof (union semun))
Thus, all tests for structs and unions of this kind generate false
positives.
Is this compiler justified in doing so and/or should the Autoconf test be
adjusted to cover this problem?
--
Peter Eisentraut address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Possible problem with AC_CHECK_TYPES,
Peter Eisentraut <=