From owner-freebsd-bugs@FreeBSD.ORG Sat Mar 15 07:41:45 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C4211065670 for ; Sat, 15 Mar 2008 07:41:45 +0000 (UTC) (envelope-from dan@obluda.cz) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [78.128.192.10]) by mx1.freebsd.org (Postfix) with ESMTP id E8B8A8FC17 for ; Sat, 15 Mar 2008 07:41:44 +0000 (UTC) (envelope-from dan@obluda.cz) X-Envelope-From: dan@obluda.cz Received: from kgw.obluda.cz (openvpn.ms.mff.cuni.cz [195.113.20.87]) by smtp1.kolej.mff.cuni.cz (8.14.2/8.14.2) with ESMTP id m2F7fSMn006197; Sat, 15 Mar 2008 08:41:29 +0100 (CET) (envelope-from dan@obluda.cz) Message-ID: <47DB7DA8.7050400@obluda.cz> Date: Sat, 15 Mar 2008 08:41:28 +0100 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.12) Gecko/20080302 SeaMonkey/1.1.8 MIME-Version: 1.0 To: Bruce Evans References: <200803150200.m2F206rl078586@freefall.freebsd.org> <20080315151246.L35251@besplex.bde.org> In-Reply-To: <20080315151246.L35251@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@freebsd.org, imp@freebsd.org Subject: Re: bin/71613: [PATCH] traceroute(8): cleanup of the usr.sbin/traceroute6 code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 07:41:45 -0000 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