PR 28079: #line range not verified without -pedantic
Tom Tromey
tromey@redhat.com
Mon Jun 9 19:58:00 GMT 2008
>>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:
Manuel> The following patch fixes 28079. It also adds linenum_t as the type
Manuel> that should be used for line numbers (which are different from
Manuel> source_location).
For future reference, please make a cleanup like the linenum_t change
a separate patch.
I am not sure about the name linenum_t. Isn't the _t suffix reserved
for use by POSIX? In that case we need a different name.
I have a few nits about this patch but nothing serious.
Manuel> + of length LEN, to binary; store it in NUMP, and return false if the
Manuel> + number was well-formed, true if not. WRAPPED is set to true if the
Two spaces between sentences.
Manuel> + number did not fit into 'unsigned long'. Temporary, hopefully. */
You might as well delete the "Temporary, hopefully" comment -- it
seems pretty unlikely now :)
Manuel> +#define SOURCE_LINE(MAP, LOCATION) \
Manuel> + ((((LOCATION) - (MAP)->start_location) >> (MAP)->column_bits) + (MAP)->to_line)
Doesn't the definition of this go past 80 columns? If so it either
needs to be wrapped, or you could rename LOCATION -> LOC to make it
shorter.
Other than these things, this looks pretty good to me.
Tom
More information about the Gcc-patches
mailing list