Deprecate C style declerations?

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Dec 21 13:33:56 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Baxter schrieb am 2006-12-22:
> Jarrett Billingsley wrote:
>> "Thomas Kuehne" <thomas-dloop at kuehne.cn> wrote in message 
>> news:slrneokpko.mj5.thomas-dloop at birke.kuehne.cn...
>> 
>>> How about "pragma(line, ...);" ?
>> 
>> Much nicer looking, but unfortunately, there's a problem with it.  Pragmas 
>> are not considered until after the lexical pass, and that's what the #line 
>> directive affects.  Basically the lexer would have to know about pragmas and 
>> be able to syntax and semantic them partially, breaking the separation 
>> between the passes.  The current syntax has the advantage of meaning 
>> absolutely nothing after the lexical pass completes.
>> 
>> Furthermore, pragmas can only legally appear where declarations would. 
>> #line can appear anywhere, even in the middle of a line.
>> 
>> But I agree that it's a waste of # :) 

> It is a waste.  So pragma's doen't work.  I also hesitate to make some 
> notation in a comment suddenly have some effect.  Maybe just make the 
> sigil be sequence of symbols rather than a single one?

Does anyone actually use the #line construct?

Thomas

-----BEGIN PGP SIGNATURE-----

iD4DBQFFiwYYLK5blCcjpWoRAg7gAJjTKNKjOSh9xogaJMrcG96//kV/AJ9ZVTCM
POsdbNOIJci9yBmgja/7vA==
=3IuB
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list