Compiler bug ?

Timon Gehr timon.gehr at gmx.ch
Sat May 18 11:08:04 PDT 2013


On 05/17/2013 07:19 PM, bearophile wrote:
> Jonathan M Davis:
>
>> However, if it _never_ makes sense to declare a variable
>> beginning with two underscores, I don't know why the compiler wouldn't
>> forbid
>> it other than the fact that it probably inserts such variables prior
>> to when
>> it would do the semantic analysis to check whether variables started with
>> underscores, in which case, catching the user's variables that start
>> with two
>> underscores while permitting the compiler's variables could get tricky.
>
> I think to answer this issue we need someone that knows more about the
> DMD compiler (as Kenji Hara). I think that if we want to forbid those
> variables in user code, then probably there is a way do to it.
>
> Bye,
> bearophile

It is trivial to catch them in the parser.


More information about the Digitalmars-d-learn mailing list