bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in bison-1.875


From: Martin MOKREJŠ
Subject: Re: bug in bison-1.875
Date: Fri, 25 Apr 2003 10:25:55 +0200 (CEST)

On Thu, 24 Apr 2003, Paul Eggert wrote:

> Martin MOKREJ© <address@hidden> writes:
>
> > cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  
> > -I/software/@sys/usr/include -I/usr/local/include 
> > -I/usr/local/openssl/include  -O2 -arch ev56 -c `test -f 'bitset.c' || echo 
> > './'`bitset.c
> > cc: Warning: bitset.c, line 149: In this statement, the referenced type of 
> > the pointer value 
> > "((((bobstack))->temp=((bytes)),((((bobstack))->chunk_limit-((bobstack))->next_free<((bobstack))->temp)?(_obstack_newchunk(...),0):0),(((bobstack))->next_free+=((bobstack))->temp)),((((bobstack))->next_free==((bobstack))->object_base?((((bobstack))->maybe_empty_object=1),0):0),((bobstack))->temp=((((bobstack))->object_base)-(char
> >  ...)0),((bobstack))->next_free=(((((((bobstack))->next_free)-(char 
> > ...)0)+((bobstack))->alignment_mask)&~(((bobstack))->alignment_mask))+(char 
> > ...)0),((((bobstack))->next_free-(char 
> > ...)((bobstack))->chunk>((bobstack))->chunk_limit-(char 
> > ...)((bobstack))->chunk)?(((bobstack))->next_free=((bobstack))->chunk_limit):0),((bobstack))->object_base=((bobstack))->next_free,((((bobstack))->temp)+(char
> >  ...)0)))" is "char", which is not compatible with "union bitset_union". 
> > (ptrmismatch)
> >   bset = obstack_alloc (bobstack, bytes);
> > --^
>
> This message comes because obstack.h contains this code:
>
> #ifndef __INT_TO_PTR
> #if defined __STDC__ && __STDC__
> # define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
> #else
> # define __INT_TO_PTR(P) ((P) + (char *) 0)
> #endif
> #endif
>
> and I suspect that your compiler does not define __STDC__, or defines
> it to 0.  Is my suspicion correct?  If so, perhaps we should change
> that '#if'.

manpage for cc says:

  The default is -std.

  -std
      Selects the relaxed ANSI language mode. This is the default. Enforces
      the ANSI C standard, but allows some common programming practices dis-
      allowed by the standard.

      This option does not restrict the Tru64 UNIX name space (for example,
      the names defined in system header files). To restrict that name space
      so that only ANSI C reserved names are visible from the ANSI C header
      files, use the _ANSI_C_SOURCE macro. See standards(5) for more details.

      This option sets the macro __STDC__ to 0.

  -std0
      Selects the K & R language mode. Enforces the K & R programming style,
      with certain ANSI extensions in areas where the K & R behavior is unde-
      fined or ambiguous. In general, -std0 compiles most pre-ANSI C programs
      and produces expected results.  The -std0 option leaves the __STDC__
      macro undefined.

  -std1
      Selects the strict ANSI language mode. Strictly enforces the ANSI C
      standard and all its prohibitions (such as those that apply to the han-
      dling of void types, the definition of lvalues in expressions, the mix-
      ing of integrals and pointers, and the modification of rvalues).

      This option does not restrict the Tru64 UNIX name space (for example,
      the names defined in system header files). To restrict that name space
      so that only ANSI C reserved names are visible from the ANSI C header
      files, use the _ANSI_C_SOURCE macro. See standards(5) for more details.

      This option sets the macro __STDC__ to 1. Note that this option also
      affects linker-defined symbols. See ld(1) for more information.


  -c99
      Selects the strict ANSI C99 language mode. Strictly enforces the ANSI
      C99 standard and all its prohibitions.

      This option does not restrict the Tru64 UNIX name space (for example,
      the names defined in system header files). To restrict that name space
      so that only ANSI reserved names are visible from the ANSI header
      files, use the _ANSI_C_SOURCE macro. See standards(5) for
      more details.

      This option sets the macro __STDC_VERSION__ to 199901L, and the macro
      _STDC__ to 1.

  -isoc94
      Enables additional features from Amendment 1 to the ANSI C89 standard.

      This option sets the macro __STDC_VERSION__ to 199409L in
      all language
      modes except for the following:

       -c99  (__STDC_VERSION__ is set to 199901L)
       -vaxc (__STDC_VERSION__ is not set)

      This option has no effect on the macro __STDC__.


Anyway, here we are with latest compiler version available:

source='bitset.c' object='bitset.o' libtool=no \
depfile='.deps/bitset.Po' tmpdepfile='.deps/bitset.TPo' \
depmode=tru64 /bin/bash ../config/depcomp \
cc -v -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  
-I/software/@sys/usr/include -I/usr/local/include -I/usr/local/openssl/include  
-O2 -arch ev56 -c `test -f 'bitset.c' || echo './'`bitset.c

/usr/lib/cmplrs/cc.dtk/gemc_cc -D__LANGUAGE_C__ -D__unix__ -D__alpha 
-D_SYSTYPE_BSD -D_LONGLONG -D__arch64__ -D__digital__ -D__osf__ -g0 -O4 
-preempt_symbol -std -intrinsics -noansi_alias -v -DHAVE_CONFIG_H -I. -I. -I.. 
-I.. -I../src -I../lib -I/software/@sys/usr/include -I/usr/local/include 
-I/usr/local/openssl/include -I/usr/include.dtk -arch ev56 -MD -o bitset.o 
bitset.c

These macros are in effect at the start of the compilation.
----- ------ --- -- ------ -- --- ----- -- --- ------------

 -D__DECC -D__osf__ -D__arch64__ -D__PRAGMA_ENVIRONMENT -D_LONGLONG 
-D__digital__ -D__X_FLOAT -D__DATE__="Apr 25 2003"  -D__STDC_VERSION__=199901L  
-D__DECC_MODE_RELAXED -D__DECC_VER=60590207  -D_SYSTYPE_BSD -D__ALPHA 
-DHAVE_CONFIG_H -D__IEEE_FLOAT -D__unix__ -D__STDC_HOSTED__ 
-D__TIME__="10:18:16"  -D__Alpha_AXP -D__INITIAL_POINTER_SIZE=0  -D__STDC__=0  
-D__LANGUAGE_C__ -D__alpha
cc: Warning: bitset.c, line 149: In this statement, the referenced type of the 
pointer value 
"((((bobstack))->temp=((bytes)),((((bobstack))->chunk_limit-((bobstack))->next_free<((bobstack))->temp)?(_obstack_newchunk(...),0):0),(((bobstack))->next_free+=((bobstack))->temp)),((((bobstack))->next_free==((bobstack))->object_base?((((bobstack))->maybe_empty_object=1),0):0),((bobstack))->temp=((((bobstack))->object_base)-(char
 ...)0),((bobstack))->next_free=(((((((bobstack))->next_free)-(char 
...)0)+((bobstack))->alignment_mask)&~(((bobstack))->alignment_mask))+(char 
...)0),((((bobstack))->next_free-(char 
...)((bobstack))->chunk>((bobstack))->chunk_limit-(char 
...)((bobstack))->chunk)?(((bobstack))->next_free=((bobstack))->chunk_limit):0),((bobstack))->object_base=((bobstack))->next_free,((((bobstack))->temp)+(char
 ...)0)))" is "char", which is not compatible with "union bitset_union". 
(ptrmismatch)
  bset = obstack_alloc (bobstack, bytes);
--^
/usr/lib/cmplrs/cc.dtk/gemc_cc:
0.37u 0.04s 0:00 95% 0+27k 0+5io 0pf+0w 27stk+3200mem
rm -f libbison.a
ar cru libbison.a argmatch.o basename.o dirname.o get-errno.o getopt.o 
getopt1.o hash.o mbswidth.o quote.o quotearg.o subpipe.o xmalloc.o xstrdup.o 
xstrndup.o abitset.o bitset.o ebitset.o bitsetv.o bitset_stats.o lbitset.o 
bitsetv-print.o timevar.o error.o error.o memrchr.o stpcpy.o strnlen.o 
obstack.o malloc.o realloc.o
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archive
ranlib libbison.a
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archive



-- 
Martin Mokrejs <address@hidden>, <address@hidden>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585




reply via email to

[Prev in Thread] Current Thread [Next in Thread]