Mainline bootstrap failure on hppa2.0w-hp-hpux11.00
Roger Sayle
roger@www.eyesopen.com
Mon Feb 3 22:57:00 GMT 2003
I'm getting a bootstrap failure on HPUX with current CVS mainline,
probably caused by the recent "-Werror" change.
The failure is building gcc/intl during stage2, which fails with the
error message
../../../gcc/gcc/intl/loadmsgcat.c: In function `_nl_load_domain':
../../../gcc/gcc/intl/loadmsgcat.c:524: warning: signed and unsigned type
in conditional expression
It turns out that the line in question is an innocent call to HPUX's
"isspace" macro defined in ctype.h. On my version of HP-UX, the
relevant defintions look like:
extern unsigned int *__SB_masks;
extern int _isspace(int);
#define isspace(__c) (__SB_masks ? __SB_masks[__c] & _ISSPACE : _isspace(__c))
which obviously causes GCC to complain about a signed/unsigned mismatch
in this, and all the other isalpha, isalnum, etc... macros.
My question is whether this is a problem with GCC's in_system_header,
or whether we need to run fixincludes on the affected file? Just in
case it's the latter, I've attached /usr/include/ctype.h to this
e-mail. Hopefully, this is enough for a fixincludes guru to come
up with a patch.
Many thanks in advance,
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833
-------------- next part --------------
/* @(#) $Revision: ../hdr/ctype.h@@/main/r11ros/cup_ros-cpe/cup_libc-ros-cpe/2 $ */
#ifndef _CTYPE_INCLUDED
#define _CTYPE_INCLUDED
#ifndef _SYS_STDSYMS_INCLUDED
# include <sys/stdsyms.h>
#endif /* _SYS_STDSYMS_INCLUDED */
#ifdef _NAMESPACE_STD
#define _NAMESPACE_STD_START namespace std {
#define _NAMESPACE_STD_END }
#define __size_t std::size_t
#define __time_t std::time_t
#define __FILE std::FILE
#define __wint_t std::wint_t
#define __struct_tm std::tm
#define __va__list std::va_list
#else
#define _NAMESPACE_STD_START
#define _NAMESPACE_STD_END
#define __size_t size_t
#define __time_t time_t
#define __FILE FILE
#define __wint_t wint_t
#define __struct_tm struct tm
#define __va__list va_list
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _INCLUDE__STDC__
#ifdef _PROTOTYPES
_NAMESPACE_STD_START
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int isupper(int);
extern int isxdigit(int);
_NAMESPACE_STD_END
# else /* not _PROTOTYPES */
extern int isalnum();
extern int isalpha();
extern int iscntrl();
extern int isdigit();
extern int isgraph();
extern int islower();
extern int isprint();
extern int ispunct();
extern int isspace();
extern int isupper();
extern int isxdigit();
#endif /* _PROTOTYPES */
# ifndef __lint
extern unsigned char *__ctype;
extern unsigned char *__ctype2;
extern unsigned char *__upshift;
extern unsigned char *__downshift;
# endif /* __lint */
#endif /* _INCLUDE__STDC__ */
/* These are Standard C APIs and should always be available. */
#ifdef _PROTOTYPES
_NAMESPACE_STD_START
extern int tolower(int);
extern int toupper(int);
_NAMESPACE_STD_END
#else
extern int tolower();
extern int toupper();
#endif /* _PROTOTYPES */
#ifdef _INCLUDE_XOPEN_SOURCE
#if !defined(_SB_CTYPE_MACROS)
# ifdef _PROTOTYPES
extern int isascii(int);
extern int toascii(int);
# else /* NOT _PROTOTYPES */
extern int isascii();
extern int toascii();
# endif /* _PROTOTYPES */
#else /* !defined(_SB_CTYPE_MACROS) */
# ifndef __lint
# define isascii(__c) ((unsigned) (__c)<=0177)
# define toascii(__c) ((__c)&0177)
# endif /* __lint */
#endif /* !defined(_SB_CTYPE_MACROS) */
#ifdef _PROTOTYPES
extern int __tolower(int);
extern int __toupper(int);
#else
extern int __tolower();
extern int __toupper();
#endif /* _PROTOTYPES */
# define _toupper(__c) __toupper(__c)
# define _tolower(__c) __tolower(__c)
#endif /* _INCLUDE_XOPEN_SOURCE */
#ifdef _INCLUDE_HPUX_SOURCE
# define _ISALPHA 0x001
# define _ISALNUM 0x002
# define _ISBLANK 0x004
# define _ISCNTRL 0x008
# define _ISDIGIT 0x010
# define _ISGRAPH 0x020
# define _ISLOWER 0x040
# define _ISPRINT 0x080
# define _ISPUNCT 0x100
# define _ISSPACE 0x200
# define _ISUPPER 0x400
# define _ISXDIGIT 0x800
/*
* Number of character classes defined above
*/
# define _NUM_CLASSES 12
# ifdef _PROTOTYPES
extern int isctype(int, unsigned int);
extern int isblank(int);
# else /* NOT _PROTOTYPES */
extern int isctype();
extern int isblank();
# endif /* _PROTOTYPES */
# if !defined(__lint)
extern unsigned int *__SB_masks;
#ifdef _PROTOTYPES
extern int _isalnum(int);
extern int _isalpha(int);
extern int _iscntrl(int);
extern int _isdigit(int);
extern int _isgraph(int);
extern int _islower(int);
extern int _isprint(int);
extern int _ispunct(int);
extern int _isspace(int);
extern int _isupper(int);
extern int _isxdigit(int);
# else /* not _PROTOTYPES */
extern int _isalnum();
extern int _isalpha();
extern int _iscntrl();
extern int _isdigit();
extern int _isgraph();
extern int _islower();
extern int _isprint();
extern int _ispunct();
extern int _isspace();
extern int _isupper();
extern int _isxdigit();
#endif /* _PROTOTYPES */
# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _ISALPHA \
: _isalpha(__c))
# define isalnum(__c) (__SB_masks ? __SB_masks[__c] & _ISALNUM \
: _isalnum(__c))
# define iscntrl(__c) (__SB_masks ? __SB_masks[__c] & _ISCNTRL \
: _iscntrl(__c))
# define isdigit(__c) (__SB_masks ? __SB_masks[__c] & _ISDIGIT \
: _isdigit(__c))
# define isgraph(__c) (__SB_masks ? __SB_masks[__c] & _ISGRAPH \
: _isgraph(__c))
# define islower(__c) (__SB_masks ? __SB_masks[__c] & _ISLOWER \
: _islower(__c))
# define isprint(__c) (__SB_masks ? __SB_masks[__c] & _ISPRINT \
: _isprint(__c))
# define ispunct(__c) (__SB_masks ? __SB_masks[__c] & _ISPUNCT \
: _ispunct(__c))
# define isspace(__c) (__SB_masks ? __SB_masks[__c] & _ISSPACE \
: _isspace(__c))
# define isupper(__c) (__SB_masks ? __SB_masks[__c] & _ISUPPER \
: _isupper(__c))
# define isxdigit(__c) (__SB_masks ? __SB_masks[__c] & _ISXDIGIT \
: _isxdigit(__c))
# endif /* !defined(__lint) */
#endif /* _INCLUDE_HPUX_SOURCE */
#ifdef __cplusplus
}
#endif
#endif /* _CTYPE_INCLUDED */
More information about the Gcc-bugs
mailing list