<< Back to previous view

[PCC-198] cpp: lvalue required Created: 03/Dec/10  Updated: 03/Dec/10

Status: Closed
Project: pcc
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: andre f. Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: pcc 101201 on OpenBSD 4.7 amd64 compiling OpenBSD 4.6 kernel source (GENERIC kernel config)


 Description   
pcc 101201 on OpenBSD 4.7 amd64 compiling OpenBSD 4.6 kernel source (GENERIC kernel config)
fails in dev/pci/ixgbe.c : line 1762: lvalue required

the reduced code fragment triggering the error:
---
#define IXGBE_ERR_SWFW_SYNC -16

int ixgbe_acquire_swfw_sync(int timeout)
{
if (!timeout) {
return -IXGBE_ERR_SWFW_SYNC;
}

return 0;
}
---

cpp generates 'return --16'


 Comments   
Comment by andre f. [ 03/Dec/10 09:55 AM ]
gcc generates 'return - -16' (a space between '-')
Comment by Anders Magnusson [ 03/Dec/10 10:02 AM ]
This is both a bug in old gcc and in the ixgb driver.
Newer gcc errors in the same way as pcc does.
This is also fixed in newer versions of the ixgbe driver in OpenBSD.
Generated at Sun Aug 31 06:17:59 CEST 2014 using JIRA Enterprise Edition, Version: 3.13.1-#333.