<div dir="ltr">The attached patch adds a new warning that triggers on mismatched header guards.  Typically, a header guard would look like:<div><br></div><div style>#ifndef HEADER_NAME_</div><div style>#define HEADER_NAME_</div>
<div style><br></div><div style>int foo = 42;<br></div><div style><br></div><div style>#endif</div><div style><br></div><div style>Occasionally, typos will cause the header guard to not function properly but still compile, such as:</div>
<div style><br></div><div style><div>#ifndef HEADER_NAME_</div><div>#define HEDAER_NAME_</div><div><br></div><div style>int foo = 42;</div><div style><br></div><div>#endif</div><div><br></div><div style>The two problem are:</div>
<div style>1) The header may be developed and used while only being included once with no problems.  Thus, it may take some time before the header guard functionality is required.</div><div style>2) When the header is included twice, the error is "redefinition of 'foo'" which obscures the actual source of the problem.</div>
</div></div>