www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1055] New: union forward reference "overlapping initialization" error

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

           Summary: union forward reference "overlapping initialization"
                    error
           Product: D
           Version: 1.009
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com


New with DMD 1.009.
This gives the error
: struct overlapbug.Z overlapping initialization for struct Z.bar

struct Z {
    int bar=1;
    union { FooT foo; }
}
struct FooT{ size_t offset=0;}


But it works if you move "int bar=1" after the union.
And it also works if you move the declaration of FooT before Z.


Also this is one of those error messages that lacks an "Error" prefix in the
message.


-- 
Mar 11 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1055


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
           Keywords|                            |rejects-valid





Do you feel that every error message should have an "Error" prefix?  Any
particular reason?  Personally, I think they're just as good or better without
it.  Moreover, even if we do have it, it should be part of the error output
mechanism itself rather than of each error message.  Making it so would be an
enhancement request, separate from this bug.


-- 
Mar 12 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1055







 Do you feel that every error message should have an "Error" prefix?  Any
 particular reason?  
There at least needs to be some easily greppable way to distinguish between the first line of an error and the continuation lines. One easy way to do that is to prefix every error with a sigil like "Error" "Warning" or "Information". This makes it possible for IDEs to automatically take you to errors in your source code and the lines they are on. And if they're all prefixed with "Error" vs "SomethingElse" then the IDE can also easily prioritize them so that it takes you to errors first and Warnings etc later (or never). --
Mar 12 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1055







 This makes it possible for IDEs to automatically take you to errors 
 in your source code and the lines they are on.
TextPad manages without it. What's more, if only all filename/lineno references relevant to a single error are at the beginning of their lines, then it can pinpoint all these lines - whereas if it relied on seeing the word "Error", it probably wouldn't. But it took me a while to get it to work on warning messages, with their peculiar format. I recall that I managed to do it in the end but seem to have lost the regexp to do it.
 And if they're all prefixed with "Error" vs "SomethingElse" then 
 the IDE can also easily prioritize them so that it takes you to 
 errors first and Warnings etc later (or never).
Good point. But still, it would depend on the IDE whether it makes any real difference. --
Mar 12 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1055


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/run/f/forward_reference_20_A.d
http://dstress.kuehne.cn/run/f/forward_reference_20_B.d
http://dstress.kuehne.cn/run/f/forward_reference_20_C.d
http://dstress.kuehne.cn/run/f/forward_reference_20_D.d


-- 
Mar 29 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1055


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

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



PDT ---

including the dstress-tests.

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



11:49:37 PDT ---
changeset 478

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



Fixed DMD1.061 and DMD2.046.

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