This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: misc gengtype micro-patch (use macro for predefined typedef)


On Sat, 6 Nov 2010 15:35:17 +0100
Richard Guenther <richard.guenther@gmail.com> wrote:

>> +#define POS_HERE(Call) do { pos.file = this_file; pos.line = __LINE__; \
>> + ? ? ? Call;} while(0)
>> + ? ? ?POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos));
>> + ? ? ?POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos));

> This doesn't look like a 1:1 transformation - who increments pos.line?

pos.line is not supposed to be incremented, but to give the accurate
line number.

It was incremented in 4.5 to avoid using __LINE__ repeatedly. (that was
a poor way of doing it, IMHO)

Then, I indented gengtype and the line increment got on seperate line,
which sucks.

Cheers

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]