Date: Tue, 5 Jul 2011 07:38:19 -0700 From: mdf@FreeBSD.org To: Robert Millan <rmh@debian.org> Cc: freebsd-hackers@freebsd.org, Ed Maste <emaste@freebsd.org>, Dimitry Andric <dim@freebsd.org> Subject: Re: [PATCH] __FreeBSD_cc_version in <sys/cdefs.h> Message-ID: <CAMBSHm8jMfr8xBjzazA-VZN-u0oMfLSX2t5ZF0Vd--h_OHgbuw@mail.gmail.com> In-Reply-To: <CAOfDtXMGdyD5LPvjdd9rS4v-rtkeJ7M=v4vyUtF-Wg23bjvtGw@mail.gmail.com> References: <CAOfDtXMHdVm%2B7DFr=ZV4x_5uQ=q%2B2A0cFxvZsUgGzqWEwURhYg@mail.gmail.com> <4E12E358.80002@FreeBSD.org> <CAOfDtXMGdyD5LPvjdd9rS4v-rtkeJ7M=v4vyUtF-Wg23bjvtGw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 5, 2011 at 6:36 AM, Robert Millan <rmh@debian.org> wrote: > 2011/7/5 Dimitry Andric <dim@freebsd.org>: >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm8jMfr8xBjzazA-VZN-u0oMfLSX2t5ZF0Vd--h_OHgbuw>