New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 9033 - Remove __thread from the language. #1616
Conversation
LGTM |
@@ -527,6 +527,8 @@ const char *StorageClassDeclaration::stcToChars(char tmp[], StorageClass& stc) | |||
assert(tbl & STCStorageClass); | |||
if (stc & tbl) | |||
{ | |||
if (tbl == STCtls) | |||
return "__thread"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we still need to print this, it might be cleaner to leave TOKtls in lexer.h and the mapping in lexer.c rather than special-casing it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well ok, I just wanted to get rid of the token entirely. But I agree, some future function might end up having to special-case as well so I better leave it in.
I just realised this keeps __thread as a keyword, which we maybe don't want. Sigh. The way it was before would probably be better than that, sorry. |
Ok I've removed it and I'll add a deprecation notice to deprecate.html. Let's wait for all greens. |
I'd prefer having the parser issue an error "__thread no longer supported, thread local storage is now the default" rather than some other random message. That means leaving it in as a keyword for now. |
The thing is |
I am 100% certain it will not break code. It NEVER worked, except in a couple of specific cases that were in the test suite, and it was never even documented. Just remove it entirely. Supporting deprecated features always comes at a cost. In this case the benefit is zero. |
+1 for removing it. |
Issue 9033 - Remove __thread from the language.
http://d.puremagic.com/issues/show_bug.cgi?id=9033