www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21314] New: ICE on extern(c++) static class variables

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

          Issue ID: 21314
           Summary: ICE on extern(c++) static class variables
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Keywords: ice
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com

If this is not possible to have TLS static variables in a c++ class then this
should be rejected by a standard frontend error. For now it's a (sort of) ICE.

test case:
---
extern(C++) class C{ static C[] cs; }    
---

output

 /tmp/temp_7FB810174D70.d:1:32: Error: variable `temp_7FB810174D70.C.cs`
Internal Compiler Error: C++ static non-`__gshared` non-`extern` variables not
supported
that should be an error issued during semantic, not as it is now --
Oct 15 2020