This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: ../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Wed, 17 Mar 1999 12:39:36 -0500
- cc: egcs-bugs at cygnus dot com
On Wed, 17 Mar 1999 11:39:12 -0500 (EST), "John David Anglin" wrote:
>Under hpux9.01, PIPE_BUF is only defined in limits.h if _XPG2 is defined.
>Here is the warning in the include file:
>
>/*
> * The following limits are not actually invariant, but can vary by file
> * system or device. the correct values can be determined using the
> * pathconf() function. The default values are provided here because the
> * constants are specified by several publications including XPG Issue 2
> * and SVID Issue 2.
> */
Hmm... I suppose in theory we ought to do it like this:
#ifdef _PC_PIPE_BUF
#undef PIPE_BUF
#define PIPE_BUF fpathconf (desc, _PC_PIPE_BUF)
#else
#ifndef PIPE_BUF
#define PIPE_BUF 4096 /* sane default */
#endif
#endif
The problem with this is PIPE_BUF is being used in an array
declaration, so we need a constant. I don't think this is worth
sweating over, the only thing this choice affects is performance, and
it *should* be in the noise anyway. If we have horrible performance
problems on systems like hpux9 we can revisit.
zw