Re: inttypes.h error for Bison

2007-07-13 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > 2007-07-02 Bruno Haible <[EMAIL PROTECTED]> > > * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++ > mode, when inttypes.h comes from gnulib. > Reported by Joel E. Denny <[EMAIL PROTECTED]>. Thanks for that patch; it

Re: inttypes.h error for Bison

2007-07-02 Thread Joel E. Denny
On Tue, 3 Jul 2007, Bruno Haible wrote: > It will not cause trouble, but it will not fix the problem either, in general: > On a platform where is POSIX compliant and is not, > this patch will have no effect, and will still try to use > INT32_MAX etc. which are not defined. > > I'm applying thi

Re: inttypes.h error for Bison

2007-07-02 Thread Bruno Haible
Joel E. Denny wrote: > --- gnulib/lib/stdint_.h 21 Jun 2007 04:39:10 - 1.43 > +++ gnulib/lib/stdint_.h 2 Jul 2007 04:22:09 - > @@ -43,6 +43,9 @@ > in would reinclude us, skipping our contents because > _GL_STDINT_H is defined. > The include_next requires a

Re: inttypes.h error for Bison

2007-07-02 Thread Joel E. Denny
On Mon, 2 Jul 2007, Bruno Haible wrote: > But even with your patch, and even with the addition of this code to > config.h, Joel's test case still fails. Sorry if I'm beating a dead horse, but the patch I had in mind does work for me. I put __STDC_LIMIT_MACROS in the stdint.h wrapper: Index: gn

Re: inttypes.h error for Bison

2007-07-02 Thread Bruno Haible
Paul Eggert wrote: > 2007-07-02 Paul Eggert <[EMAIL PROTECTED]> > > * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]: > #define __STDC_LIMIT_MACROS temporarily while including > , so that __STDC_LIMIT_MACROS is defined. > Problem reported by Joel E. D

Re: inttypes.h error for Bison

2007-07-02 Thread Paul Eggert
"Joel E. Denny" <[EMAIL PROTECTED]> writes: > Thanks. Could Gnulib's lib/stdint_.h define __STDC_LIMIT_MACROS for C++? That sounds like the simplest workaround, for now anyway. I installed this into gnulib. I can think of more complicated but namespace-clean fixes but I'm not sure they're wort

Re: inttypes.h error for Bison

2007-07-01 Thread Joel E. Denny
On Mon, 2 Jul 2007, Bruno Haible wrote: > The problem is that gnulib's > inttypes_.h heavily relies on the INT*_MAX, INT*_MIN, UINT*_MAX macros > from , but does not define these macros in C++ mode if > __STDC_LIMIT_MACROS is not defined. > > It is not clear to me how we can fix this. In the mea

Re: inttypes.h error for Bison

2007-07-01 Thread Bruno Haible
Joel E. Denny wrote: > > - Bison from CVS HEAD, then "./bootstrap", right? > > Yes. > > > - How did you configure it? > > Either: > > ./configure > ./configure --enable-gcc-warnings The latter doesn't count, since it enables -Werror. But without -enable-gcc-warnings I reproduce the err

Re: inttypes.h error for Bison

2007-07-01 Thread Joel E. Denny
On Mon, 2 Jul 2007, Bruno Haible wrote: > OK, then can you please - as always in a bug report - tell how to > reproduce the problem? > - Which platform? > - Which version of gcc? You must have missed the first message in this thread: http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg

Re: inttypes.h error for Bison

2007-07-01 Thread Bruno Haible
Joel E. Denny wrote: > I have the same trouble without -Werror. OK, then can you please - as always in a bug report - tell how to reproduce the problem? - Which platform? - Which version of gcc? - Bison from CVS HEAD, then "./bootstrap", right? - How did you configure it? Bruno

Re: inttypes.h error for Bison

2007-07-01 Thread Joel E. Denny
On Mon, 2 Jul 2007, Bruno Haible wrote: > Joel E. Denny wrote: > > Using the same compiler options as for building Bison: > > > > --- > > % gcc -std=gnu99 -I. -I. -I../lib -I../lib \ > > -Wall -Wextra -Wno-sign-compare -Wcast-align -Wcast-qual -Wformat \ > > -Wpointer-arit

Re: inttypes.h error for Bison

2007-07-01 Thread Bruno Haible
Joel E. Denny wrote: > Using the same compiler options as for building Bison: > > --- > % gcc -std=gnu99 -I. -I. -I../lib -I../lib \ > -Wall -Wextra -Wno-sign-compare -Wcast-align -Wcast-qual -Wformat \ > -Wpointer-arith -Wwrite-strings -Wbad-function-cast -Wmissing-declara

Re: inttypes.h error for Bison

2007-07-01 Thread Joel E. Denny
On Sun, 1 Jul 2007, James Youngman wrote: > Thanks for the detailed bug report; what are the values of these C > proprocessor macros on your system when you use the same set of > compiler options as you were using to build Bison? > > INT_MIN > INT_MAX > INT32_MIN > INT32_MAX I created tmp.c: --

Re: inttypes.h error for Bison

2007-07-01 Thread James Youngman
On 7/1/07, Joel E. Denny <[EMAIL PROTECTED]> wrote: I get this error for C++ test cases in Bison from CVS: % uname -a Linux slackware 2.6.13 #1 Sat Sep 3 21:11:20 PDT 2005 i686 unknown unknown GNU/Linux % g++ --version g++ (GCC) 4.1.0 Thanks for the detailed bug report; what are the values

inttypes.h error for Bison

2007-07-01 Thread Joel E. Denny
I get this error for C++ test cases in Bison from CVS: --- In file included from /home/jdenny/bison/lib/stdint.h:71, from /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../include/c++/4.1.0/bits/postypes.h:49, from /usr/local