Edit answer: As mentioned in the comments. The problem in this case is that the spelling
external int a; auto a = 3;
is the same as spelling
external int a; int a = 3;
this means that you have a new definition of a and that is causing an error.
First answer: For my understanding, this violates parts of the Unified Definition rule. In particular, I have in mind the following rule (in relation to MISRA C ++ 2008), which states that an identifier with external communication should always have only one definition. In your example, you have a definition in the current file ( auto a = 3; ), and with the external you also refer to the definition in another file.
cpow May 24 '16 at 8:45 2016-05-24 08:45
source share