On Sat, May 05, 2012 at 09:51:40AM -0700, H. S. Teoh wrote:
> On Fri, May 04, 2012 at 02:39:00PM -0700, Adam Wilson wrote:
> > On Fri, 04 May 2012 14:12:16 -0700, H. S. Teoh
> > <hst...@quickfur.ath.cx> wrote:
> [...]
> > >Exactly. And while we're at it, *really* strip unnecessary stuff from
> > >.di files, like function bodies, template bodies, etc.. That stuff is
> > >required by the compiler, not the user, so stick that in the object
> > >files and let the compiler deal with it. The .di file should be ONLY
> > >what's needed for the user to understand how to use the library.
> [...]
> > I've written code to do this, but apparently it breaks Phobos in the
> > autotester. I can't get it to break Phobos on my local machine so I'm
> > at a loss as how to fix it. Maybe you can help? The code is here:
> > https://github.com/LightBender/dmd.git
> [...]
> 
> Sorry for taking so long to respond, been busy. Got some time this
> morning to cloned your repo and built dmd, then rebuilt druntime and
> phobos, and got this error from phobos:
> 
> ../druntime/import/core/sys/posix/sys/select.di(25): function declaration 
> without return type. (Note that constructors are always named 'this')
> ../druntime/import/core/sys/posix/sys/select.di(25): no identifier for 
> declarator __FDELT(int d)
> ../druntime/import/core/sys/posix/sys/select.di(27): function declaration 
> without return type. (Note that constructors are always named 'this')
> ../druntime/import/core/sys/posix/sys/select.di(27): no identifier for 
> declarator __FDMASK(int d)
> make[1]: *** [generated/linux/release/32/libphobos2.a] Error 1
> make: *** [release] Error 2
[...]

Oh, and here's the snippet from the offending file
(core/sys/posix/sys/select.di):

------SNIP------
                private 
                {
                        alias c_long __fd_mask;
                        enum uint __NFDBITS = 8 * __fd_mask.sizeof;
                        extern (D) auto __FDELT(int d);         // this is line 
25

                        extern (D) auto __FDMASK(int d);        // this is line 
27

                }
------SNIP------

Looks like the problem is caused by the auto, perhaps?


T

-- 
Lottery: tax on the stupid. -- Slashdotter

Reply via email to