There is a rule that states that one shouldn't define or use identifiers in C or C++ that start with an underscore followed by a capital, e.g. _Foo
. This is because these identifiers are reserved by the compiler and thus might collide with some compiler code and result in undefined behavior.
Although this rule is well-known and adopted by many coding standards, I have never seen a real life situation in which this rule could have prevented a lot of damage.
Does somebody know a real-life example of a violation of this rule? EDIT: I am talking about code that compiles and links fine but shows unexpected behavior because of this.