Skip to content
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

Merged
merged 2 commits into from Feb 26, 2013
Merged

Issue 9033 - Remove __thread from the language. #1616

merged 2 commits into from Feb 26, 2013

Conversation

ghost
Copy link

@ghost ghost commented Feb 4, 2013

@ibuclaw
Copy link
Member

ibuclaw commented Feb 5, 2013

LGTM

@@ -527,6 +527,8 @@ const char *StorageClassDeclaration::stcToChars(char tmp[], StorageClass& stc)
assert(tbl & STCStorageClass);
if (stc & tbl)
{
if (tbl == STCtls)
return "__thread";
Copy link
Member

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.

Copy link
Author

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.

@yebblies
Copy link
Member

yebblies commented Feb 6, 2013

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.
I doubt we need to go through the whole deprecation process, but it should probably be added to deprecate.html.

@ghost
Copy link
Author

ghost commented Feb 6, 2013

Ok I've removed it and I'll add a deprecation notice to deprecate.html. Let's wait for all greens.

@WalterBright
Copy link
Member

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.

@ghost
Copy link
Author

ghost commented Feb 20, 2013

The thing is __thread was practically never used in D2 except the DMD test-suite. At least I haven't seen it used by anyone or any library. And it's not in D1 either. It's extremely easy to remove it automatically as well. We can add a note about it in the changelog, but I'm 99% certain it won't break any code.

@don-clugston-sociomantic
Copy link
Contributor

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.

@dnadlinger
Copy link
Member

+1 for removing it.

WalterBright added a commit that referenced this pull request Feb 26, 2013
Issue 9033 - Remove __thread from the language.
@WalterBright WalterBright merged commit 709d575 into dlang:master Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants