<html>
    <head>
      <base href="http://bugzilla.gdcproject.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support for "Variable Templates" missing/broken"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=160">160</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Support for "Variable Templates" missing/broken
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>GDC
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.8.x
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MinGW
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gdc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ibuclaw@gdcproject.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>p.remmers@arcor.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reading the "D Programming Language" CHM Guide from my DMD installation,
I found the chapter about templates, which says:

Variable Templates
Same as aggregates and functions, variable declarations with Initializer can
have optional template parameters: 

enum string constant(TL...) = TL.stringof;
ubyte[T.sizeof] storage(T) = 0;
auto array(alias a) = a;

These declarations are transformed into templates: 

template constant(TL...) {
  enum string constant = TL.stringof;
}
template storage(T) {
  ubyte[T.sizeof] storage = 0;
}
template array(alias a) {
  auto array = a;
}


When I tried the short forms of these examples with GDC, I got a bunch of
errors (semicolon expected following function declaration). Basically, GDC does
not recognize them as variable templates. Checking with DMD resulted in no
error messages.

I'm on Windows, using this package:
<a href="https://bitbucket.org/goshawk/gdc/downloads/GCC-4.8-MinGW-GDC-.7z">https://bitbucket.org/goshawk/gdc/downloads/GCC-4.8-MinGW-GDC-.7z</a>

D:\workspace\dtest>gdc -v
Using built-in specs.
COLLECT_GCC=gdc
COLLECT_LTO_WRAPPER=d:/gdc/bin/../libexec/gcc/i686-pc-mingw32/4.8.0/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../configure --prefix=/crossdev/gdc/install
--with-gmp=/crossdev/gdc/deps/gmp --with-mpfr=/crossdev/gdc/deps/mpfr
--with-mpc=/crossdev/gdc/deps/mpc --with-cloog=/crossdev/gdc/deps/cloog/
--with-isl=/crossdev/gdc/deps/isl --disable-bootstrap
--enable-languages=c,c++,d,lto
Thread model: win32
gcc version 4.8.0 20130303 (experimental) (GCC)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>