www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2654] New: forward reference bug.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2654

           Summary: forward reference bug.
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: someanon yahoo.com


http://www.digitalmars.com/d/archives/digitalmars/D/circular_deps_53496.html

But according to the specs the compiler is indeed buggy.
The specs say:
| The order in which ImportDeclarations occur has no significance.

//main.d --------------8<---------------
import vec3, mat3, quat;
int main() { return 0; }

// mat3.d--------------8<---------------
module mat3;
import vec3, quat;
struct Mat3 { Vec3[3] m; }

// quat.d--------------8<---------------
module quat;
import vec3, mat3;
struct Quat {}

// vec3.d--------------8<---------------
module vec3;
import mat3, quat;
struct Vec3 { }


I get this back from the compiler....

unixbox$ dmd main.d vec3.d mat3.d quat.d 
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
unixbox$


-- 
Feb 10 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2654






Created an attachment (id=288)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=288&action=view)
the source code.


-- 
Feb 10 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2654


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
  BugsThisDependsOn|                            |2386
OtherBugsDependingO|                            |340
              nThis|                            |
           Keywords|                            |rejects-valid





Please remember to assign keywords to bug reports.  To everybody reading this:
Please look through issues you've reported and check for missing keywords.

Moreover, what was the point of the attachment when you've already posted the
code?  What's more, it's so small that by gzipping it you've actually made it
bigger than the original files!

Anyway, this seems to be closely related to issue 2386....


-- 
Feb 15 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2654


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de



PDT ---

this issue

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 27 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2654


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bearophile_hugs eml.cc
         Resolution|                            |FIXED



Fixed in dmd v1.061 and v2.046.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 15 2010