From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 16 12:00:04 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E96106566C for ; Sun, 16 Mar 2008 12:00:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 49CC98FC12 for ; Sun, 16 Mar 2008 12:00:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2GC03ts045809 for ; Sun, 16 Mar 2008 12:00:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2GC03kW045808; Sun, 16 Mar 2008 12:00:03 GMT (envelope-from gnats) Date: Sun, 16 Mar 2008 12:00:03 GMT Message-Id: <200803161200.m2GC03kW045808@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: linimon@lonesome.com (Mark Linimon) Cc: 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 Reply-To: Mark Linimon List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 12:00:05 -0000 The following reply was made to PR bin/71613; it has been noted by GNATS. From: linimon@lonesome.com (Mark Linimon) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/71613: [PATCH] traceroute(8): cleanup of the usr.sbin/traceroute6 code Date: Sun, 16 Mar 2008 06:50:49 -0500 ----- Forwarded message from Dan Lukes ----- From: Dan Lukes To: Bruce Evans Cc: freebsd-bugs@freebsd.org, imp@freebsd.org Bruce Evans napsal/wrote, On 03/15/08 18:12: >__COPYRIGHT() in reduces this problem by concatenating >__LINE__. It could also concatenate a file name (but not __FILE__, since >that is probably not an identifier). It's heuristic. It may, or may not work (it may or may not create unique name across all sources). >> We still have the problem the variable may be optimized out. > >__used prevents this. __used is nonstandard gcc extension. I tried it on gcc 3.4.6 and 4.2.3. It works. I don't know if it work for icc as I have no one. If it works, then it's good fix. >volatile doesn't prevent the variable being optimized out for gcc-4.2. >This makes some sense -- volatile sort of means "use it carefully", but >when it is not used no care with it is needed. The meaning of volatile shall be "use it carefully, because you can't found which way the variable is used". If the gcc-4.2 optimized it out, it's definitely gcc's bug. If I claim "you don't know how it's used" the compiler shall never respond "I better know what I know than you". But such discussion doesn't belong there. >I prefer 'static char const __used copyright[]'. Not sure where __used >belongs. I have no problem with it if __used works for all relevant compilers. I prefer the form of a macro (may be other than __COPYRIGHT) for further maintenance, but no problem even with non-macro form. ------------- Well, it seems we reach consensus. So what about commitment of a patch for this four year old PR ? ;-) Dan ----- End forwarded message -----