Bug 23899 – GCC __restrict and __restrict__ type qualifier in ImportC

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2023-05-06T16:24:40Z
Last change time
2023-05-29T07:09:17Z
Keywords
ImportC
Assigned to
No Owner
Creator
mail

Comments

Comment #0 by mail — 2023-05-06T16:24:40Z
/usr/include/time.h:100:42: error: found ā€˜__s’ when expecting ā€˜,’ 100 | extern size_t strftime (char *__restrict __s, size_t __maxsize, | ^ /usr/include/time.h:100:45: error: no type-specifier for parameter 100 | extern size_t strftime (char *__restrict __s, size_t __maxsize, Code: extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW;
Comment #1 by bugzilla — 2023-05-11T06:00:38Z
importc.h has: #define __restrict in it, so the preprocessor removes the __restrict the compiler never sees it. I.e. I cannot reproduce the problem. Perhaps you're using an older version of the compiler?
Comment #2 by bugzilla — 2023-05-29T07:09:17Z
Works fine with master.