On Sun, Sep 11, 2016 at 04:32:07PM -0700, Sterling Hughes wrote: > I think a temporary exception would be fine: but I’m not sure the > impact, perhaps somebody who understands C++ better can chime in. Why > are ‘#includes’ _excluded_ from the extern “C” namespace? Is it > just to avoid cluttering that namespace? Or are there subtle/nefarious > effects?
The danger is that included headers could contain actual C++ declarations (e.g., overloaded functions). If the header contents are declared with C linkage via extern "C", compilation will fail. This isn't an issue in our case because there isn't any C++ code in the repository. Chris > If its just to avoid namespace clutter, I think a two-part process (i.e. > we add header guards now, then fix ‘#includes’ ad-hoc) would be > good. It would also be good if we could have checkguards not fix up the > files, but rather just spit out an error on non-conformant files, that > way we could add it to our CI suite and get notifications when we break > C++ style per-commit.