This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type


On Wed, 17 Mar 1999 21:18:53 -0700, Jeffrey A Law wrote:
>
>  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.

That's what I said...

>Why not malloc the memory instead of having an array in static storage?  That
>would allow you to use fpathconf.

I might do that anyway just to stop chewing up so much stack.

>You really shouldn't assume that -- particularly stuff that is relatively
>new -- think about sunos, hpux9, and other older systems.

It was defined on sunos4.  I tend to assume that things in sunos4 are
common enough not to worry about until someone complains.

As I said, I don't think this is a critical issue, Dave's patch should
be fine for now.  

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]