[fpc-devel] Re: possibility to include compiler info (line number) as integer rather than string

Seth Grover sethdgrover at gmail.com
Fri Feb 24 23:53:07 CET 2012


I've provided a patch.

http://mantis.freepascal.org/view.php?id=21372

Cheers,

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover



On Fri, Feb 24, 2012 at 3:13 PM, Seth Grover <sethdgrover at gmail.com> wrote:
> Actually I already found it, and it will be trivial to do.
>
> Would this be useful to anyone else? Should I submit a patch?
> Basically I'm adding a "LINENUM" macro (vs. the existing "LINE" macro)
> which inserts the line number as an numeric rather than a string
> constant.
>
> -SG
>
>
> --
> This email is fiction. Any resemblance to actual events
> or persons living or dead is purely coincidental.
>
> Seth Grover
>
>
>
> On Fri, Feb 24, 2012 at 2:49 PM, Seth Grover <sethdgrover at gmail.com> wrote:
>> Quoting http://www.freepascal.org/docs-html/prog/progsu38.html
>>
>> --------------------
>> the {$INCLUDE} directive inserts a string constant in the source code.
>>
>> ...
>> LINE
>>    Linenumer on which the directive is found.
>> --------------------
>>
>> How hard would it be for me to modify the FPC preprocessor to add an
>> option (INTLINE or something) to insert a numeric constant in the
>> source code rather than a string constant?
>>
>> If that would be doable, could anyone give me a pointer on where in
>> the source code I'd look to begin? I haven't delved much into that
>> realm of the compiler's code as of yet.
>>
>> Thanks,
>>
>> -SG
>>
>>
>>
>> --
>> This email is fiction. Any resemblance to actual events
>> or persons living or dead is purely coincidental.
>>
>> Seth Grover



More information about the fpc-devel mailing list