Fix wrong line info sometimes output for macros: When macro parameters were
expanded, the line info came from the parameter replacement list, but was marked as coming from the macro. Now parameter replacement lists don't change the line info. git-svn-id: svn://svn.cc65.org/cc65/trunk@5051 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -135,7 +135,7 @@ struct MacExp {
|
||||
unsigned ParamCount; /* Number of actual parameters */
|
||||
TokNode** Params; /* List of actual parameters */
|
||||
TokNode* ParamExp; /* Node for expanding parameters */
|
||||
unsigned LISlot; /* Slot for additional line infos */
|
||||
int LISlot; /* Slot for additional line infos */
|
||||
};
|
||||
|
||||
/* Maximum number of nested macro expansions */
|
||||
@@ -235,7 +235,7 @@ static void FreeIdDescList (IdDesc* ID)
|
||||
/* Free a complete list of IdDesc structures */
|
||||
{
|
||||
while (ID) {
|
||||
IdDesc* This = ID;
|
||||
IdDesc* This = ID;
|
||||
ID = ID->Next;
|
||||
FreeIdDesc (This);
|
||||
}
|
||||
@@ -656,8 +656,8 @@ static int MacExpand (void* Data)
|
||||
*/
|
||||
if (Mac->ParamExp) {
|
||||
|
||||
/* Ok, use token from parameter list */
|
||||
TokSet (Mac->ParamExp, Mac->LISlot);
|
||||
/* Ok, use token from parameter list, but don't use its line info */
|
||||
TokSet (Mac->ParamExp, LI_SLOT_INV);
|
||||
|
||||
/* Set pointer to next token */
|
||||
Mac->ParamExp = Mac->ParamExp->Next;
|
||||
|
||||
Reference in New Issue
Block a user