www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 609] New: Const struct member is a non-constant expression

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

           Summary: Const struct member is a non-constant expression
           Product: D
           Version: 0.175
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: smjg iname.com


----------
struct MyStruct { int i; }

const MyStruct a = { 42 };
MyStruct b = { a.i };
----------
const_struct_1.d(4): Error: non-constant expression *(& a)
----------

Changing line 4 to

    int b = a.i;

gives the same error.


-- 
Nov 27 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=609


samukha voliacable.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker
            Version|0.175                       |1.020




------- Comment #1 from samukha voliacable.com  2007-08-31 06:10 -------
I'm changing the severity and compiler version because this one is a blocker
for me.


-- 
Aug 31 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=609


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.020                       |0.175




------- Comment #2 from deewiant gmail.com  2007-08-31 06:28 -------
Please don't increase version numbers.
http://www.digitalmars.com/d/archives/digitalmars/D/bugs/bugzilla_usage_tips_10071.html


-- 
Aug 31 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=609





------- Comment #3 from samukha voliacable.com  2007-08-31 06:48 -------
Sorry, I hadn't read that post.


-- 
Aug 31 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=609


Don <clugdbug yahoo.com.au> changed:

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




--- Comment #4 from Don <clugdbug yahoo.com.au>  2009-07-22 04:31:23 PDT ---
Works for me Windows DMD1.046. Fixed long ago.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 22 2009