www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23715] New: compilable/testcstuff1.c:273:23: error:

https://issues.dlang.org/show_bug.cgi?id=23715

          Issue ID: 23715
           Summary: compilable/testcstuff1.c:273:23: error: function-scope
                    'tli' implicitly auto and declared '_Thread_local'
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

When compiling the test with `gcc -std=c11 -fsyntax-only`

compilable/testcstuff1.c:273:23: error: function-scope ‘tli’ implicitly auto
and declared ‘_Thread_local’
  273 |     _Thread_local int tli;
      |         


Original test
```
void test2()
{
    _Thread_local int tli;
}
```

--
Feb 15 2023