I'm switching from old gcc(3.x) to 4.9.2 and I have some compile issue:
if (ROWID_IS_NULL(&pSumItem->getRowId()))
getRowId() is defined as:
rowid_t SumItem::getRowId()
{
return row_id;
}
macro is defined as:
#define ROWID_IS_NULL(a) \
((a)->key == 0 && (a)->ip_addr == 0)
The new code already uses operator overloading to do the calculation, but there still remains a lot of the old code using the non-standard technique. Is it possible to fix this problem without changing the codes?
Error message:
error: taking address of temporary [-fpermissive]
Edit : meaning of do not changing the codes
I want to keep this line work
if (ROWID_IS_NULL(&pSumItem->getRowId()))
-fpermissive, but it's not the greatest option for code safety.