svn commit: r209119 - head/sys/sys

Stefan Farfeleder stefanf at
Sun Jun 13 20:53:50 UTC 2010

On Sun, Jun 13, 2010 at 01:59:11PM +0000, mdf at wrote:
> (Relevant but almost a thread hijack):
> At Isilon we've run into a lot of problems with variable declarations
> in macros, especially with -Wshadow turned on.  We ended up
> backporting __COUNTER__ from later versions of gcc and then using it
> to make unique variable names.
>  - is the backport (or a fresh implementation) something that could be
> done within the scope of the GPL license?
>  - is it something FreeBSD would be interested in?
>  - is __COUNTER__ supported by clang?
>  - if not, could it be?
> -Wshadow found several nasty bugs in our code, and apart from a few
> spurious warnings it has been handy to have when building our
> filesystem.

In my opinion using non-standard C features just to work around warnings
is a bit questionable.  A more useful feature would be an attribute that
avoids -Wshadow warnings.


More information about the svn-src-all mailing list