Issue Details (XML | Word | Printable)

Key: PCC-198
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: andre f.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

cpp: lvalue required

Created: 03/Dec/10 09:43 AM   Updated: 03/Dec/10 10:02 AM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

Environment: pcc 101201 on OpenBSD 4.7 amd64 compiling OpenBSD 4.6 kernel source (GENERIC kernel config)


 Description  « Hide
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'


 All   Comments   Change History      Sort Order: Descending order - Click to sort in ascending order
Anders Magnusson added a comment - 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.

andre f. added a comment - 03/Dec/10 09:55 AM
gcc generates 'return - -16' (a space between '-')