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

John David Anglin dave@hiauly1.hia.nrc.ca
Wed Mar 17 08:39:00 GMT 1999


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.
 */

...

#    define PIPE_BUF    8192    /* max number bytes that is guaranteed
				   to be atomic when writing to a pipe */

> 
> This is a multi-part message in MIME format.
> --------------E8DD0DF6DF816F648D2FC152
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> It looks like PIPE_BUF is not defined on all platforms. I have checked in the attached temporary patch until Zack can take a closer look.
> 
> Dave
> 
> John David Anglin wrote:
> 
> > In the current cvs source, the following error occurs:
> >
> > gcc -c  -DIN_GCC -DHAIFA    -g -W -Wall  -DHAVE_CONFIG_H    -I. -I../../gcc -I../../gcc/config -I../../gcc/../include ../../gcc/cppfiles.c
> > ../../gcc/cppfiles.c: In function `read_and_prescan':
> > ../../gcc/cppfiles.c:823: `PIPE_BUF' undeclared (first use in this function)
> > ../../gcc/cppfiles.c:823: (Each undeclared identifier is reported only once
> > ../../gcc/cppfiles.c:823: for each function it appears in.)
> > ../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type
> > make[2]: *** [cppfiles.o] Error 1
> > make[2]: Leaving directory `/xxx/gnu/egcs-2.93.12/objdir/gcc'
> > make[1]: *** [bootstrap] Error 2
> > make[1]: Leaving directory `/xxx/gnu/egcs-2.93.12/objdir/gcc'
> > make: *** [bootstrap] Error 2
> >
> > --
> > J. David Anglin                                  dave.anglin@nrc.ca
> > National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
> 
> 
> 
> --------------E8DD0DF6DF816F648D2FC152
> Content-Type: text/plain; charset=us-ascii; name="PIPE_BUF.txt"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline; filename="PIPE_BUF.txt"
> 
> Index: cppfiles.c
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/cppfiles.c,v
> retrieving revision 1.18
> diff -c -p -c -r1.18 cppfiles.c
> *** cppfiles.c	1999/03/16 13:10:09	1.18
> --- cppfiles.c	1999/03/17 16:17:43
> *************** find_position (start, limit, linep, colp
> *** 803,808 ****
> --- 803,812 ----
>      If your file has more than one kind of end-of-line marker, you
>      will get messed-up line numbering.  */
>   
> + #ifndef PIPE_BUF
> + #define PIPE_BUF 4096
> + #endif
> + 
>   static long
>   read_and_prescan (pfile, fp, desc, len)
>        cpp_reader *pfile;
> 
> --------------E8DD0DF6DF816F648D2FC152--
> 
> 


-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


More information about the Gcc-bugs mailing list