www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Interface file is generated wrong

reply "Tolga Cakiroglu (tcak)" <tcak pcak.com> writes:
I have written a module as below:

file: lib.d

import core.sys.posix.dlfcn;

private static this(){}

private static ~this(){}

public shared class Apps{
}


---

This code is compiled with "-H" flag to generate an interface 
file. Generated interface file is below:


file: lib.di

// D import file generated from 'lib.d'
import core.sys.posix.dlfcn;
private static this();

private
public shared class Apps
{
}

---

Compiler is adding a redundant "private" keyword before the 
class, and static destructor function is not there any more. Thus 
compiler is giving "Redundant protection attribute" error.

Bug? (I don't know if I should immediately file a bug when I 
think it is a bug without asking what other people thinks.)
Feb 18 2014
parent reply "Stanislav Blinov" <stanislav.blinov gmail.com> writes:
On Tuesday, 18 February 2014 at 10:07:37 UTC, Tolga Cakiroglu 
(tcak) wrote:

 Bug?
Yup.
 (I don't know if I should immediately file a bug when I think 
 it is a bug without asking what other people thinks.)
1) Do a seach in bugzilla 2) If the search doesn't show anything similar, file it 3) If it's not a bug, it'll be closed as such That's it :)
Feb 18 2014
parent reply "Tolga Cakiroglu" <tcak pcak.com> writes:
On Tuesday, 18 February 2014 at 10:15:51 UTC, Stanislav Blinov 
wrote:
 On Tuesday, 18 February 2014 at 10:07:37 UTC, Tolga Cakiroglu 
 (tcak) wrote:

 Bug?
Yup.
 (I don't know if I should immediately file a bug when I think 
 it is a bug without asking what other people thinks.)
1) Do a seach in bugzilla 2) If the search doesn't show anything similar, file it 3) If it's not a bug, it'll be closed as such That's it :)
Thanks. Well, by putting that destructor to the end of lib.d, dmd has ended with segmentation error. dmd -c lib.d -H -fPIC -release -inline gcc --shared lib.o -o lib.so dmd app.d -L-ldl -release -O -inline lib.di(83): Error: declaration expected following attribute, not EOF make: *** [app] Segmentation fault (core dumped) It looks like a big bug.
Feb 18 2014
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Tue, 18 Feb 2014 05:47:41 -0500, Tolga Cakiroglu <tcak pcak.com> wrote:

 On Tuesday, 18 February 2014 at 10:15:51 UTC, Stanislav Blinov wrote:
 On Tuesday, 18 February 2014 at 10:07:37 UTC, Tolga Cakiroglu (tcak)  
 wrote:

 Bug?
Yup.
 (I don't know if I should immediately file a bug when I think it is a  
 bug without asking what other people thinks.)
1) Do a seach in bugzilla 2) If the search doesn't show anything similar, file it 3) If it's not a bug, it'll be closed as such That's it :)
Thanks. Well, by putting that destructor to the end of lib.d, dmd has ended with segmentation error. dmd -c lib.d -H -fPIC -release -inline gcc --shared lib.o -o lib.so dmd app.d -L-ldl -release -O -inline lib.di(83): Error: declaration expected following attribute, not EOF make: *** [app] Segmentation fault (core dumped) It looks like a big bug.
Please mark said bug with the tag "ice". This marks it as a bug which crashes the compiler, and it will get a higher priority. -Steve
Feb 18 2014
parent "Tolga Cakiroglu" <tcak pcak.com> writes:
On Tuesday, 18 February 2014 at 15:02:38 UTC, Steven 
Schveighoffer wrote:
 On Tue, 18 Feb 2014 05:47:41 -0500, Tolga Cakiroglu 
 <tcak pcak.com> wrote:

 On Tuesday, 18 February 2014 at 10:15:51 UTC, Stanislav Blinov 
 wrote:
 On Tuesday, 18 February 2014 at 10:07:37 UTC, Tolga Cakiroglu 
 (tcak) wrote:

 Bug?
Yup.
 (I don't know if I should immediately file a bug when I 
 think it is a bug without asking what other people thinks.)
1) Do a seach in bugzilla 2) If the search doesn't show anything similar, file it 3) If it's not a bug, it'll be closed as such That's it :)
Thanks. Well, by putting that destructor to the end of lib.d, dmd has ended with segmentation error. dmd -c lib.d -H -fPIC -release -inline gcc --shared lib.o -o lib.so dmd app.d -L-ldl -release -O -inline lib.di(83): Error: declaration expected following attribute, not EOF make: *** [app] Segmentation fault (core dumped) It looks like a big bug.
Please mark said bug with the tag "ice". This marks it as a bug which crashes the compiler, and it will get a higher priority. -Steve
Okay. Done. Issue 12192 - Wrong interface file content generated that crashes compiler
Feb 18 2014