On 07/16/2011 10:37 AM, Dodji Seketeli wrote:
+ /* This array of location is actually an array of pairs of + locations. The elements inside it thus look like: + + x0,y0, x1,y1, x2,y2, ...., xn,yn.
Pairs of locations still seems limited, given the flexibility of macro expansion; with macros that use other macros a particular token can be substituted an arbitrary number of times; the first time doesn't seem particularly special.
But then, it seems that nothing uses the replacement point currently. The diagnostics mentioned in patch 3 only seem to use the spelling location and the expansion location:
[dodji@adjoa gcc]$ ./cc1 -quiet -ftrack-macro-expansion test.c test.c: In function ‘g’: test.c:5:14: erreur: invalid operands to binary << (have ‘double’ and ‘int’) test.c:2:9: note: in expansion of macro 'OPERATE' test.c:5:3: note: expanded from here test.c:5:14: note: in expansion of macro 'SHIFTL' test.c:8:3: note: expanded from here test.c:8:3: note: in expansion of macro 'MULT2' test.c:13:3: note: expanded from here
So how do you expect to use the replacement point information? Jason