From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 9 May 2018 07:16:27 -0400 Subject: [U-Boot] GCC 7.x vs. C++ comments In-Reply-To: <5B756B92-A9EE-4227-9D8E-887F6E8E1597@theobroma-systems.com> References: <5B756B92-A9EE-4227-9D8E-887F6E8E1597@theobroma-systems.com> Message-ID: <20180509111627.GD12235@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On Wed, May 09, 2018 at 10:46:10AM +0200, Dr. Philipp Tomsich wrote: > Tom, >=20 > I recently ran a local buildman with a came across these: > > cc -Wp,-MD,tools/.gen_eth_addr.d -Wall -Wstrict-prototypes -O2 -fomit= -frame-pointer -include ./include/compiler.h -idirafterinclude -idirafte= r./arch/arm/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNE= L_STRICT_NAMES -D_GNU_SOURCE -pedantic -o tools/gen_eth_addr tools/gen_eth_= addr.c =20 > > tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed i= n ISO C90 > > // SPDX-License-Identifier: GPL-2.0+ > > ^ > > tools/gen_eth_addr.c:1:1: warning: (this will be reported only once per= input file) > > cc -Wp,-MD,tools/.gen_ethaddr_crc.o.d -Wall -Wstrict-prototypes -O2 -= fomit-frame-pointer -include ./include/compiler.h -idirafterinclude -idi= rafter./arch/arm/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__= KERNEL_STRICT_NAMES -D_GNU_SOURCE -pedantic -c -o tools/gen_ethaddr_crc.o t= ools/gen_ethaddr_crc.c > > tools/gen_ethaddr_crc.c:1:1: warning: C++ style comments are not allowe= d in ISO C90 > > // SPDX-License-Identifier: GPL-2.0+ > > ^ > > tools/gen_ethaddr_crc.c:1:1: warning: (this will be reported only once = per input file) > > echo "#include <../lib/crc8.c>" >tools/lib/crc8.c > > cc -Wp,-MD,tools/lib/.crc8.o.d -Wall -Wstrict-prototypes -O2 -fomit-f= rame-pointer -include ./include/compiler.h -idirafterinclude -idirafter.= /arch/arm/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_= STRICT_NAMES -D_GNU_SOURCE -pedantic -c -o tools/lib/crc8.o tools/lib/crc8.c > > In file included from tools/lib/crc8.c:1:0: > > ./tools/../lib/crc8.c:1:1: warning: C++ style comments are not allowed = in ISO C90 > > // SPDX-License-Identifier: GPL-2.0+ > > ^ >=20 > The system compiler was a > > Using built-in specs. > > COLLECT_GCC=3Dcc > > COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper > > Target: x86_64-linux-gnu > > Configured with: ../src/configure -v --with-pkgversion=3D'Debian 4.9.2-= 10+deb8u1' --with-bugurl=3Dfile:///usr/share/doc/gcc-4.9/README.Bugs --enab= le-languages=3Dc,c++,java,go,d,fortran,objc,obj-c++ --prefix=3D/usr --progr= am-suffix=3D-4.9 --enable-shared --enable-linker-build-id --libexecdir=3D/u= sr/lib --without-included-gettext --enable-threads=3Dposix --with-gxx-inclu= de-dir=3D/usr/include/c++/4.9 --libdir=3D/usr/lib --enable-nls --with-sysro= ot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-t= ime=3Dyes --enable-gnu-unique-object --disable-vtable-verify --enable-plugi= n --with-system-zlib --disable-browser-plugin --enable-java-awt=3Dgtk --ena= ble-gtk-cairo --with-java-home=3D/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre = --enable-java-home --with-jvm-root-dir=3D/usr/lib/jvm/java-1.5.0-gcj-4.9-am= d64 --with-jvm-jar-dir=3D/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --wi= th-arch-directory=3Damd64 --with-ecj-jar=3D/usr/share/java/eclipse-ecj.jar = --enable-objc-gc --enable-multiarch --with-arch-32=3Di586 --with-abi=3Dm64 = --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric= --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-lin= ux-gnu --target=3Dx86_64-linux-gnu > > Thread model: posix > > gcc version 4.9.2 (Debian 4.9.2-10+deb8u1)=20 >=20 >=20 > What=E2=80=99s your preferred solution: > (a) change these comments > (b) change our Makefiles to let GCC know that we are compiling gnu99/C99? >=20 > Neither solution is too appealing to me, so I am asking... Lets go with (b) which I guess what a more modern toolchain defaults to anyhow. Thanks! --=20 Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: