struct Location size

Johan j at j.nl
Wed May 10 06:09:25 UTC 2023


On Wednesday, 10 May 2023 at 03:01:34 UTC, Walter Bright wrote:
> On 5/9/2023 4:57 AM, Patrick Schluter wrote:
>> Does it concern also C files handled by ImportC?
>
> Yes
>
>> If yes, be aware that there's no limit in C in line length and 
>> that the pre-processor can generate humongous lines.
>
> D has no line limit, either. The saving grace is the column is 
> not used for anything other than error messages, so it's not a 
> catastrophy if it sticks at 64.

Then why save the column number at all? At limit 64, it will be 
wrong very often.

>> In that case splitting line/column is a bad idea and file 
>> offset is just enough.
>
> File offset is a performance problem and also requires keeping 
> the source files in memory.

It is not a problem for Clang.

-Johan



More information about the Digitalmars-d mailing list