bin/71613: [PATCH] traceroute(8): cleanup of the usr.sbin/traceroute6 code

Dan Lukes dan at obluda.cz
Sat Mar 15 07:41:45 UTC 2008


Bruce Evans napsal/wrote, On 03/15/08 06:06:
> gcc broke its guarantee about "const" stopping this warning, and even
> more importantly, of the variable not being removed, in gcc-4 or
> earlier.  The #if 0 in the above was committed on 2003/04/30 with a
...
> Using a volatile qualifier instead of a const qualifier gives inconsistent
> results.  gcc-4.3 always removes "static char volatile copyright[] but
> doesn't warn about this removal at WARNS > 1.  Not warning is clearly
> just a bug.  gcc-3.3.3 always keeps this variable, and warns about it
> being unused at WARNS > 1.

	Hm. It seems the GCCs are not consistent between versions. In advance, 
we didn't speak about intel's icc for now.

	I found something that make both proposed patches void. There is 
defined __COPYRIGHT macro in sys/cdef.h exactly just for such purpose. 
The cdefs.h logic tried to deal with icc/gcc and gcc.x/gcc.y differences.

	Even new gcc versions or brand new compiler can be handled in one place.

	So all the 'copyright' places shall be patched using __COPYRIGHT macro.


						Dan


More information about the freebsd-bugs mailing list