[cfe-commits] [Patch] Add -Wmissing-variable-declarations

Ed Schouten ed at 80386.nl
Fri Oct 19 05:37:14 PDT 2012


Hi Eli,

2012/10/19 Eli Friedman <eli.friedman at gmail.com>:
> In C (or C++ in an 'extern "C"' block), "bar" shouldn't have
> UniqueExternalLinkage.  In C++, there isn't any reason to warn here:
> "bar" can't be referenced from any other translation unit.  See
> [basic.link]p8 in the standard.

Oh, okay. I wasn't aware of that. I have to confess I'm more a C
programmer than a C++ programmer. Anyway, I've updated the code and
the testcases.

http://80386.nl/pub/wmissing-variable-declarations.txt

-- 
Ed Schouten <ed at 80386.nl>



More information about the cfe-commits mailing list