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:
uz
2011-06-13 08:53:41 +00:00
parent d1426aaa43
commit ff9841d7b5
5 changed files with 28 additions and 22 deletions

View File

@@ -134,7 +134,7 @@ void InitLineInfo (void)
unsigned AllocLineInfoSlot (unsigned Type, unsigned Count)
int AllocLineInfoSlot (unsigned Type, unsigned Count)
/* Allocate a line info slot of the given type and return the slot index */
{
/* Grow the array if necessary */
@@ -152,18 +152,18 @@ unsigned AllocLineInfoSlot (unsigned Type, unsigned Count)
CurLineInfo[UsedSlots].Info = 0;
/* Increment the count and return the index of the new slot */
return UsedSlots++;
return (int) UsedSlots++;
}
void FreeLineInfoSlot (unsigned Slot)
void FreeLineInfoSlot (int Slot)
/* Free the line info in the given slot. Note: Alloc/Free must be used in
* FIFO order.
*/
{
/* Check the parameter */
PRECONDITION (Slot == UsedSlots - 1);
PRECONDITION (Slot == (int) UsedSlots - 1);
/* Free the last entry */
CurLineInfo[Slot].Info = 0;
@@ -172,7 +172,7 @@ void FreeLineInfoSlot (unsigned Slot)
void GenLineInfo (unsigned Slot, const FilePos* Pos)
void GenLineInfo (int Slot, const FilePos* Pos)
/* Generate a new line info in the given slot */
{
/* Get a pointer to the slot */
@@ -190,7 +190,7 @@ void GenLineInfo (unsigned Slot, const FilePos* Pos)
void ClearLineInfo (unsigned Slot)
void ClearLineInfo (int Slot)
/* Clear the line info in the given slot */
{
/* Zero the pointer */