From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 5 14:38:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6191F106566C for ; Tue, 5 Jul 2011 14:38:20 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id DC82C8FC1E for ; Tue, 5 Jul 2011 14:38:19 +0000 (UTC) Received: by qwc9 with SMTP id 9so3961161qwc.13 for ; Tue, 05 Jul 2011 07:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SyqUbiQF4PxMXUNiME2Do1RXowh8LcYlFBwUJUT354E=; b=qXs5yTmWdBi+uoDRm20XW8EdG8kWH+tD0s39CN6e9OzuX6c+niyD6TvDGXCdTJoRem p+AFZ5XwI9HWLdKxCl3EivZk41tAp56Mryrph43NQ+48VkL8So+FzxsQkwI2Z0l+FsZg B/G4vfmLprA+cp78uasBuAtiYTQ1TCNWNTtJQ= MIME-Version: 1.0 Received: by 10.229.7.3 with SMTP id b3mr5458284qcb.194.1309876699070; Tue, 05 Jul 2011 07:38:19 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.62.229 with HTTP; Tue, 5 Jul 2011 07:38:19 -0700 (PDT) In-Reply-To: References: <4E12E358.80002@FreeBSD.org> Date: Tue, 5 Jul 2011 07:38:19 -0700 X-Google-Sender-Auth: UePBzZNcumaN_-by6H3Mcc7XFnY Message-ID: From: mdf@FreeBSD.org To: Robert Millan Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Ed Maste , Dimitry Andric Subject: Re: [PATCH] __FreeBSD_cc_version in X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2011 14:38:20 -0000 On Tue, Jul 5, 2011 at 6:36 AM, Robert Millan wrote: > 2011/7/5 Dimitry Andric : >> As far as I can see, this code only gives warnings when compiled with >> gcc 4.5 or higher, and when using the -Wundef flag. =A0Isn't it easier t= o >> just remove the -Wundef flag here? > > Here's a patch to remove -Wundef. =A0I think it's a bad idea however, > IMHO it's better to fix the cause of the warning instead. The problem is that, IIRC, C guarantees that an undefined symbol when checked in a #if context will evaluate to 0. So -Wundef checks for warnings on compliant code. Personally I have no objection to the original patch. Cheers, matthew