<< Back to previous view

[PCC-426] restrict qualifier causes error with typedef pointer Created: 07/May/14  Updated: 08/May/14

Status: Resolved
Project: pcc
Component/s: C frontend, Common code, i386 target, pcc backend
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Iain Hibbert Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD/i386

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.

Comment by Anders Magnusson [ 08/May/14 12:51 PM ]
Forgot to check for typedef'd pointers, fixed now.
Generated at Sun Mar 25 07:05:41 CEST 2018 using JIRA Enterprise Edition, Version: 3.13.1-#333.