diff options
author | Michael Forney <mforney@mforney.org> | 2019-06-18 18:08:29 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-06-18 18:09:29 -0700 |
commit | b237b938d0e10da65f951ed64e7e38ae5926c804 (patch) | |
tree | 7aaa0ed00cc4cadd7631cc4deb9ca1c14acc0fd4 | |
parent | 02924887cf666e76a97413ddf18b1da997c400b9 (diff) | |
download | cproc-b237b938d0e10da65f951ed64e7e38ae5926c804.tar.xz |
decl: _Thread_local is not yet supported
-rw-r--r-- | decl.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -887,13 +887,18 @@ decl(struct scope *s, struct func *f) base = declspecs(s, &sc, &fs, &align); if (!base.type) return false; - if (!f) { + if (f) { + if (sc == SCTHREADLOCAL) + error(&tok.loc, "block scope declaration containing '_Thread_local' must contain 'static' or 'extern'"); + } else { /* 6.9p2 */ if (sc & SCAUTO) error(&tok.loc, "external declaration must not contain 'auto'"); if (sc & SCREGISTER) error(&tok.loc, "external declaration must not contain 'register'"); } + if (sc & SCTHREADLOCAL) + error(&tok.loc, "'_Thread_local' is not yet supported"); if (consume(TSEMICOLON)) { /* XXX 6.7p2 error unless in function parameter/struct/union, or tag/enum members are declared */ return true; |