[Expat-bugs] [ expat-Bugs-1021776 ] Recursion in macro "parsing", HP 11.0

SourceForge.net noreply at sourceforge.net
Thu Jan 27 16:14:44 CET 2005


Bugs item #1021776, was opened at 2004-09-03 08:06
Message generated for change (Comment added) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1021776&group_id=10127

Category: None
Group: Platform Specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Recursion in macro "parsing", HP 11.0

Initial Comment:
uname -a

HP-UX hprgs B.11.00 U 9000/800 76745 unlimited-user 
license

./configure

checking build system type... hppa2.0w-hp-hpux11.00
checking host system type... hppa2.0w-hp-hpux11.00
checking for gcc... /usr/ccs/bin/cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /usr/ccs/bin/cc accepts -g... yes
checking for non-GNU ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependant libraries... 
file_magic (s[0-9][0-9][0-9]|PA
-RISC[0-9].[0-9]) shared library
checking command to parse /usr/bin/nm -p output... ok
checking how to run the C preprocessor... /usr/ccs/bin/
cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for /usr/ccs/bin/cc option to produce PIC... +Z
checking if /usr/ccs/bin/cc PIC flag +Z works... yes
checking if /usr/ccs/bin/cc static flag -Wl,-a -Wl,archive 
works... yes
checking if /usr/ccs/bin/cc supports -c -o file.o... no
checking if we can lock with hard links... yes
checking whether the linker (/usr/bin/ld) supports shared 
libraries... yes
checking how to hardcode library paths into programs... 
relink
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... hpux11.00 dld.sl
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
checking for gcc... (cached) /usr/ccs/bin/cc
checking whether we are using the GNU C compiler... 
(cached) no
checking whether /usr/ccs/bin/cc accepts -g... (cached) 
yes
checking for a BSD-compatible install... conftools/install-
sh -c
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... yes
checking for /usr/ccs/bin/cc option to accept ANSI C... 
none needed
checking for an ANSI C-conforming const... no
checking for size_t... yes
checking for memmove... yes
checking for bcopy... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking check.h usability... cat: Cannot open conftest.
c: No such file or directory
no
checking check.h presence... no
checking for check.h... no
checking for check.h... (cached) no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h
hprgs:#/varios/perl/expat-1.95.8> ./configure
checking build system type... hppa2.0w-hp-hpux11.00
checking host system type... hppa2.0w-hp-hpux11.00
checking for gcc... /usr/ccs/bin/cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /usr/ccs/bin/cc accepts -g... yes
checking for non-GNU ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependant libraries... 
file_magic (s[0-9][0-9][0-9]|PA
-RISC[0-9].[0-9]) shared library
checking command to parse /usr/bin/nm -p output... ok
checking how to run the C preprocessor... /usr/ccs/bin/
cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for /usr/ccs/bin/cc option to produce PIC... +Z
checking if /usr/ccs/bin/cc PIC flag +Z works... yes
checking if /usr/ccs/bin/cc static flag -Wl,-a -Wl,archive 
works... yes
checking if /usr/ccs/bin/cc supports -c -o file.o... no
checking if we can lock with hard links... yes
checking whether the linker (/usr/bin/ld) supports shared 
libraries... yes
checking how to hardcode library paths into programs... 
relink
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... hpux11.00 dld.sl
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
checking for gcc... (cached) /usr/ccs/bin/cc
checking whether we are using the GNU C compiler... 
(cached) no
checking whether /usr/ccs/bin/cc accepts -g... (cached) 
yes
checking for a BSD-compatible install... conftools/install-
sh -c
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... yes
checking for /usr/ccs/bin/cc option to accept ANSI C... 
none needed
checking for an ANSI C-conforming const... no
checking for size_t... yes
checking for memmove... yes
checking for bcopy... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking check.h usability... no
checking check.h presence... no
checking for check.h... no
checking for check.h... (cached) no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h

make

        /bin/sh ./libtool --silent --mode=compile /usr/ccs/
bin/cc -g -DHAVE_EXPAT_CONFIG_H   -I./lib -I. -o lib/
xmlparse.lo -c lib/xmlparse.c
(Bundled) cc: warning 480: The -g option is available only 
with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Z option is available 
only with the C/ANSI C product; ignored.
cpp: "lib/xmlparse.c", line 855: error 4065: Recursion in 
macro "parsing".
*** Error exit code 1

Stop.


----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2005-01-27 10:14

Message:
Logged In: YES 
user_id=3066

Less than ideal because it breaks the convention, but it's
also expanding not to a member of the parser but a member of
a member of the parser, so it's a little different anyway.

After I submitted the patch, I realized that we could see
the same problem for "finalBuffer" on the affected platform;
if we don't I'll be very surprised actually.

The final patch will need to include a comment explaining
why the macros are different from the others, and cite this
tracker issue.


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2005-01-27 09:37

Message:
Logged In: YES 
user_id=290026

The only objection I would have is that this breaks the
naming convention for these types of macros.
But that is not a showstopper for me.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2005-01-27 00:23

Message:
Logged In: YES 
user_id=3066

While this seems rather clearly to be a compiler problem, 
we can deal with this by renaming the "parsing" macro; 
that won't be a problem for the API (since the macro is 
strictly internal) nor will it be a problem for compliant 
compilers. 
 
I've attached a patch.  If someone who can reproduce the 
problem can test the patch on an affected version of 
HP-UX, that would be quite helpful. 
 

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-12-21 11:12

Message:
Logged In: YES 
user_id=290026

I had a further look at the source and found these macros
  #define parsing (parser->m_parsingStatus.parsing)
  #define finalBuffer (parser->m_parsingStatus.finalBuffer)
as the likely source of your problems.

AFAIK, if a macro refers to itself, then the C preprocessor
must not expand the reference, so it looks as if your
compiler breaks that rule.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-12-21 09:29

Message:
Logged In: YES 
user_id=290026

Must be a platform issue, but I have no expertise in it.
However, we may get a build expert on board, and then
I'll assign this issue to him.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-12-21 08:49

Message:
Logged In: NO 

I have the same problem??

Steen.brandtmar at ementor.dk

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-09-14 04:55

Message:
Logged In: NO 

I have the same issue.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1021776&group_id=10127


More information about the Expat-bugs mailing list