This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix BUILTINS_LOCATION with -fpreprocessed (PR preprocessor/41543)
>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:
Jakub> I've kept this so that -E keeps printing:
Jakub> # 1 "test.c"
Jakub> # 1 "<built-in>"
Jakub> # 1 "<command-line>"
Jakub> # 1 "test.c"
Jakub> as it always used to. I guess at least some programs parsing -E output
Jakub> might be confused if that <built-in> line goes away.
I see, thanks.
Do we know for sure that any code assigning a location to a builtin uses
BUILTINS_LOCATION and not input_location?
Jakub> Well, libcpp side doesn't do anything with UNKNOWN_LOCATION or
Jakub> BUILTINS_LOCATION, all it does is reserve some number of lowest
Jakub> numbered source_location values for caller's special uses. So,
Jakub> rather than putting those into libcpp libcpp perhaps should
Jakub> define RESERVED_LOCATION_COUNT or something similar, and gcc
Jakub> should assert that BUILTINS_LOCATION is smaller than that.
This sounds good to me.
Tom