All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] GCC 7.x vs. C++ comments
@ 2018-05-09  8:46 Dr. Philipp Tomsich
  2018-05-09 11:16 ` Tom Rini
  0 siblings, 1 reply; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2018-05-09  8:46 UTC (permalink / raw)
  To: u-boot

Tom,

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 -idirafter./arch/arm/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -pedantic -o tools/gen_eth_addr tools/gen_eth_addr.c  
> tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed in 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 -idirafter./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 tools/gen_ethaddr_crc.c
> tools/gen_ethaddr_crc.c:1:1: warning: C++ style comments are not allowed 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-frame-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+
>  ^

The system compiler was a
> Using built-in specs.
> COLLECT_GCC=cc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10+deb8u1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.9.2 (Debian 4.9.2-10+deb8u1) 


What’s your preferred solution:
	(a) change these comments
	(b) change our Makefiles to let GCC know that we are compiling gnu99/C99?

Neither solution is too appealing to me, so I am asking...

Thanks,
Philipp.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-05-10 12:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09  8:46 [U-Boot] GCC 7.x vs. C++ comments Dr. Philipp Tomsich
2018-05-09 11:16 ` Tom Rini
2018-05-09 11:38   ` Wolfgang Denk
2018-05-09 11:48     ` Tom Rini
2018-05-09 12:46       ` Wolfgang Denk
2018-05-09 13:49         ` Tom Rini
2018-05-09 14:11           ` Dr. Philipp Tomsich
2018-05-09 15:40           ` Wolfgang Denk
2018-05-09 16:07             ` Wolfgang Denk
2018-05-09 16:22               ` Tom Rini
2018-05-09 16:14             ` Tom Rini
2018-05-09 20:44               ` Wolfgang Denk
2018-05-10 12:07           ` Måns Rullgård

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.