Issue Details (XML | Word | Printable)

Key: PCC-132
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

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

attributes on function arguments cause argument miscount

Created: 24/Apr/10 10:48 PM   Updated: 02/Jun/10 10:13 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
compiling the following code fragment

void foo(int __attribute__((__unused__)));

void bar(void)
{
        foo(0);
}

fails with "too few arguments to function" at the foo(0) call

- the 'extra' argument appears to be an int as foo(0, 0) does work fine
- if an argument name is provided, the error does not appear

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 02/Jun/10 10:13 PM
Fixed by discarding parameter attributes.