../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type
Jeffrey A Law
law@hurl.cygnus.com
Wed Mar 17 20:19:00 GMT 1999
In message < 199903171739.MAA12438@blastula.phys.columbia.edu >you write:
> 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.
No, fpathconf may actually be a function call. If PIPE_BUF is used in an
array declaration, then we must be a compile-time constant.
Why not malloc the memory instead of having an array in static storage? That
would allow you to use fpathconf.
jeff
More information about the Gcc-bugs
mailing list