On Mon, Nov 6, 2023 at 8:29 PM David Malcolm <dmalc...@redhat.com> wrote: > > Here's a work-in-progress patch for GCC that adds a libdiagnostics.h > header describing the public interface, along with various testcases > that show usage examples for the API. Various aspects of this need > work; posting now for early feedback on overall direction. > > How does the interface look? > ... > +typedef unsigned int diagnostic_location_t;
One comment that occurred to me... for GCC we have a lot of PRs that are unhappy about the 32-bit location_t and the consequent issues that arise with very large source files, or with very long lines that lose column information. So far GCC has been able to get by with "don't do that" advice, but a more general libdiagnostics may need to avoid that arbitrary limitation? I feel like it may not be that long before GCC needs to deal with it as well, perhaps with a configure option, but even now, it could make sense for libdiagnostic to use a 64-bit location_t itself from the outset, so it won't need to change later, even if it's practically restricted to 32 bits for now. -Lewis