cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit b237b938d0e10da65f951ed64e7e38ae5926c804
parent 02924887cf666e76a97413ddf18b1da997c400b9
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 18 Jun 2019 18:08:29 -0700

decl: _Thread_local is not yet supported

Diffstat:
Mdecl.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/decl.c b/decl.c @@ -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;