I asked Nelson to try compiling hello on his array of systems, which he graciously did. It basically went fine, and then he went further and tried compiling it with C++ compilers. The hello code itself is so simple it is no problem, but there are a variety of syntax errors in various gnulib modules with C++, included below.
Is supporting compilation with C++ of interest? (I'm not arguing for it, just reporting it, since Nelson went to the trouble of trying it.) Best, Karl Date: Tue, 24 Oct 2006 06:09:35 -0600 (MDT) From: "Nelson H. F. Beebe" <[EMAIL PROTECTED]> [...] Here is a sprinkling of the kinds of errors C++ compilers reported about hello-2.1.94 on just one mchine; I suspect all of them are trivial to fix: Machinetype: Sun W40z (4 CPUs, 2400 MHz AMD64 Opteron, 8GB RAM); GNU/Linux Red Hat Enterprise Linux AS 4 Configure environment: CC=g++ CXX=g++ CFLAGS="-pedantic -Wall -W -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wredundant-decls -Winline -O3" CXXFLAGS="-pedantic -Wall -W -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wredundant-decls -Winline -O3" LDFLAGS="-L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64" g++ -DHAVE_CONFIG_H -I. -I../.. -I../../intl -pedantic -Wall -W -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wredundant-decls -Winline -O3 -c xalloc-die.c In file included from xalloc-die.c:31: gettext.h: In function `const char* dcpgettext_expr(const char*, const char*, const char*, int)': gettext.h:172: error: ISO C++ forbids variable-size array `msg_ctxt_id' gettext.h: In function `const char* dcnpgettext_expr(const char*, const char*, const char*, const char*, long unsigned int, int)': gettext.h:218: error: ISO C++ forbids variable-size array `msg_ctxt_id' Configure environment: CC=icc CFLAGS="-Kc++ -I/usr/local/include" CXX=icc CXXFLAGS="-Kc++ -I/usr/local/include" LDFLAGS="-L/usr/local/lib64 -Wl,-rpath,/opt/intel/cce/9.1.020/lib:/usr/local/lib64" LD_LIBRARY_PATH=/opt/intel/cce/9.1.020/lib:/usr/local/lib64:/usr/lib64:/lib64 FC=ifort F77=ifort icc -DHAVE_CONFIG_H -I. -I../.. -I../../intl -Kc++ -I/usr/local/include -c quotearg.c quotearg.c(125): error: a value of type "void *" cannot be used to initialize an entity of type "quoting_options *" struct quoting_options *p = xmalloc (sizeof *p); ^ quotearg.c(557): error: a value of type "void *" cannot be used to initialize an entity of type "char *" char *buf = xmalloc (bufsize); ^ quotearg.c(607): error: a value of type "void *" cannot be assigned to an entity of type "slotvec *" slotvec = xmalloc (sizeof *slotvec); ^ quotearg.c(610): error: a value of type "void *" cannot be assigned to an entity of type "slotvec *" slotvec = xrealloc (slotvec, n1 * sizeof *slotvec); ^ quotearg.c(625): error: a value of type "void *" cannot be assigned to an entity of type "char *" slotvec[n].val = val = xmalloc (size); ^ Configure environment: CC=pathCC CFLAGS="-I/usr/local/include" CXX=pathCC CXXFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64 -L/opt/pscale/2.5/lib/2.5 -Wl,-rpath,/opt/pscale/2.5/lib/2.5" FC=pathf90 F77=pathf90 pathCC -DHAVE_CONFIG_H -I. -I../.. -I../../intl -I/usr/local/include -c quotearg.c quotearg.c: In function `quoting_options* clone_quoting_options(quoting_options*)': quotearg.c:125: error: invalid conversion from `void*' to `quoting_options*' quotearg.c: In function `char* quotearg_alloc(const char*, long unsigned int, const quoting_options*)': quotearg.c:557: error: invalid conversion from `void*' to `char*' quotearg.c: In function `char* quotearg_n_options(int, const char*, long unsigned int, const quoting_options*)': quotearg.c:607: error: invalid conversion from `void*' to ` quotearg_n_options(int, const char*, long unsigned int, const quoting_options*)::slotvec*' quotearg.c:610: error: invalid conversion from `void*' to ` quotearg_n_options(int, const char*, long unsigned int, const quoting_options*)::slotvec*' quotearg.c:625: error: invalid conversion from `void*' to `char*' Configure environment: CC=pgCC CXX=pgCC FC=pgf77 F77=pgf77 LDFLAGS="-L/usr/local/lib64 -R/usr/local/lib64" pgCC -DHAVE_CONFIG_H -I. -I../.. -I../../intl -g -c xalloc-die.c "gettext.h", line 172: error: expression must have a constant value char msg_ctxt_id[msgctxt_len + msgid_len]; ^ "gettext.h", line 172: error: expression must have a constant value char msg_ctxt_id[msgctxt_len + msgid_len]; ^ "gettext.h", line 218: error: expression must have a constant value char msg_ctxt_id[msgctxt_len + msgid_len]; ^ "gettext.h", line 218: error: expression must have a constant value char msg_ctxt_id[msgctxt_len + msgid_len]; ^ 4 errors detected in the compilation of "xalloc-die.c". Configure environment: CC=sunCC CXX=sunCC CFLAGS=-xarch=amd64 CXXFLAGS=-xarch=amd64 LDFLAGS="-L/usr/local/lib64 -R/usr/local/lib64" sunCC -DHAVE_CONFIG_H -I. -I../.. -I../../intl -xarch=amd64 -c xalloc-die.c "gettext.h", line 172: Error: An integer constant expression is required within the array subscript operator. "gettext.h", line 218: Error: An integer constant expression is required within the array subscript operator. 2 Error(s) detected.