Deprecate C style declerations?
Oskar Linde
oskar.lindeREM at OVEgmail.com
Thu Dec 21 05:34:45 PST 2006
Hasan Aljudy wrote:
>
>
> Don Clugston wrote:
>> I'd also add:
>> * some alternative to #line that doesn't waste the '#' symbol on such
>> a rarely-used feature.
I kind of like Nazo's suggestion of putting it in a comment. Any
un-aware parser would automatically just ignore such things.
/// LINE: 17
Otherwise, could something like
pragma(line,17)
work?
> I've always wondered if there's even anyone out there using this so
> called "feature"?
> Why would you want to alter the lexer's internal state of the current
> line number?
> Who even came up with the idea?
It is useful when the code is auto generated, having line numbers
referring back to the original file. One example would be a YACC
generated parser with line numbers in the generated code referring to
the parser definition file.
/Oskar
More information about the Digitalmars-d
mailing list