Issue Details (XML | Word | Printable)

Key: PCC-426
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

restrict qualifier causes error with typedef pointer

Created: 07/May/14 10:14 PM   Updated: 08/May/14 12:51 PM
Component/s: C frontend, Common code, i386 target, pcc backend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
The restrict qualifier, when coupled with a typedef pointer causes an error in compilation. The following code

typedef void *foo_t;
void bar(foo_t restrict);

when compiled with "pcc -c test.c", fails:

test.c, line 2: invalid use of 'restrict'
/usr/libexec/ccom terminated with status 1

NB if we use "foo_t * restrict" as the type, or "void *" directly then it is accepted.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 08/May/14 12:51 PM
Forgot to check for typedef'd pointers, fixed now.