Opened 5 years ago

Closed 4 years ago

#58101 closed defect (worksforme)

icu @58.2: C++ style comments are not allowed in ISO C90

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: leopard Cc:
Port: icu

Description

An example:

Making all in .
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_textproc_libxml2/libxml2/work/libxml2-2.9.9'
/bin/sh ./libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I.  -I./include -I./include -I/opt/local/include -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long -Wno-format-extra-args  -D_REENTRANT   -pipe -Os -arch ppc -MT SAX.lo -MD -MP -MF .deps/SAX.Tpo -c -o SAX.lo SAX.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./include -I./include -I/opt/local/include -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long -Wno-format-extra-args -D_REENTRANT -pipe -Os -arch ppc -MT SAX.lo -MD -MP -MF .deps/SAX.Tpo -c SAX.c  -fno-common -DPIC -o .libs/SAX.o
In file included from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/ucnv.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/ucnv.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/ucnv_err.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/ucnv_err.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utypes.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utypes.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/umachine.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/umachine.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/umachine.h:46,
                 from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/ptypes.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/ptypes.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/ptypes.h:52,
                 from /opt/local/include/unicode/umachine.h:46,
                 from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/platform.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/platform.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/platform.h:24,
                 from /opt/local/include/unicode/ptypes.h:52,
                 from /opt/local/include/unicode/umachine.h:46,
                 from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/uconfig.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/uconfig.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/platform.h:25,
                 from /opt/local/include/unicode/ptypes.h:52,
                 from /opt/local/include/unicode/umachine.h:46,
                 from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/uvernum.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/uvernum.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/umachine.h:379,
                 from /opt/local/include/unicode/utypes.h:38,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/urename.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/urename.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utypes.h:39,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/uversion.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/uversion.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utypes.h:44,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utf.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utf.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utf.h:217,
                 from /opt/local/include/unicode/utypes.h:44,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utf8.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utf8.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utf.h:218,
                 from /opt/local/include/unicode/utypes.h:44,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utf16.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utf16.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utf.h:221,
                 from /opt/local/include/unicode/utypes.h:44,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utf_old.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utf_old.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/utf_old.h:150,
                 from /opt/local/include/unicode/utf.h:221,
                 from /opt/local/include/unicode/utypes.h:44,
                 from /opt/local/include/unicode/ucnv_err.h:88,
                 from /opt/local/include/unicode/ucnv.h:52,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/utf.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/utf.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/ucnv.h:53,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/uenum.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/uenum.h:1:1: warning: (this will be reported only once per input file)
In file included from /opt/local/include/unicode/uenum.h:23,
                 from /opt/local/include/unicode/ucnv.h:53,
                 from ./include/libxml/encoding.h:31,
                 from ./include/libxml/parser.h:810,
                 from ./include/libxml/globals.h:18,
                 from ./include/libxml/threads.h:35,
                 from ./include/libxml/xmlmemory.h:218,
                 from SAX.c:15:
/opt/local/include/unicode/localpointer.h:1:1: warning: C++ style comments are not allowed in ISO C90
/opt/local/include/unicode/localpointer.h:1:1: warning: (this will be reported only once per input file)
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./include -I./include -I/opt/local/include -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long -Wno-format-extra-args -D_REENTRANT -pipe -Os -arch ppc -MT SAX.lo -MD -MP -MF .deps/SAX.Tpo -c SAX.c -o SAX.o >/dev/null 2>&1

Wouldn't it be worth to use a newer compiler on Leopard since the sources have grown to ISO C90+? Or use extra compiler switches like -std=gnu99 or -std=iso9899:1999? When building with each of these two switches GCC4.2 keeps quiet on my PowerBook G4.

Change History (3)

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Port: icu added; libxml2 removed
Status: newassigned
Summary: Building libxml2 @2.9.9 with /usr/bin/gcc-4.2 on Mac OS X 10.5.8, Leopard, emits so many 'C++ style comments are not allowed in ISO C90' warningsicu @58.2: C++ style comments are not allowed in ISO C90

Those warning are coming from files installed by the icu port. So either icu should be fixed so that the files it installs are compatible with C89, or other ports that include icu's files will have to specify a newer C standard.

The icu port is already years out of date, because newer versions require C++11 and I didn't want to impose that on other ports. But at some point we probably have to bite that bullet.

I'll assign this to myself since I am the maintainer of icu, but I do not plan to work on this issue at this time; if somebody else wants to, please feel free to do so.

comment:2 Changed 5 years ago by jmroot (Joshua Root)

The warning is probably only being displayed because of -pedantic. Most C compilers have allowed C++-style comments as an extension since the '90s.

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: assignedclosed

This is just a warning and doesn't cause any actual problems.

Note: See TracTickets for help on using tickets.