digitalmars.D.bugs - [Issue 979] New: offsetof for classes does not work
- d-bugmail puremagic.com (26/26) Feb 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
- Tom (7/40) Feb 18 2007 Hey Frank,
- d-bugmail puremagic.com (8/10) Feb 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
- d-bugmail puremagic.com (10/10) Feb 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
- d-bugmail puremagic.com (6/6) Mar 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
- d-bugmail puremagic.com (10/10) Apr 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
- d-bugmail puremagic.com (11/11) Jun 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=979
http://d.puremagic.com/issues/show_bug.cgi?id=979
Summary: offsetof for classes does not work
Product: D
Version: 1.005
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: benoit tionex.de
from: http://www.digitalmars.com/d/class.html
the example
class Foo
{
int x;
}
void test(Foo foo)
{
size_t o;
o = Foo.x.offsetof; // yields 8
}
t.d(12): Error: 'this' is only allowed in non-static member functions, not test
t.d(12): Error: this for x needs to be type Foo not type int
--
Feb 17 2007
Hey Frank,
don't you think that maybe in this one, severity could be marked as
something higher than normal?
Kind regards,
--
Tom;
d-bugmail puremagic.com escribió:
http://d.puremagic.com/issues/show_bug.cgi?id=979
Summary: offsetof for classes does not work
Product: D
Version: 1.005
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: benoit tionex.de
from: http://www.digitalmars.com/d/class.html
the example
class Foo
{
int x;
}
void test(Foo foo)
{
size_t o;
o = Foo.x.offsetof; // yields 8
}
t.d(12): Error: 'this' is only allowed in non-static member functions, not test
t.d(12): Error: this for x needs to be type Foo not type int
Feb 18 2007
http://d.puremagic.com/issues/show_bug.cgi?id=979
benoit tionex.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |major
don't you think that maybe in this one, severity could be marked as
something higher than normal?
Yes, i forgot about setting this.
--
Feb 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=979
But note, this works:
class Foo{
int x;
static void foo(){
int o = x.offsetof; // works
}
}
--
Feb 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=979 Added to DStress as: http://dstress.kuehne.cn/run/offsetof_78_B.d http://dstress.kuehne.cn/run/offsetof_78_C.d --
Mar 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=979
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Linux |All
fixed URLs:
http://dstress.kuehne.cn/run/o/offsetof_78_B.d
http://dstress.kuehne.cn/run/o/offsetof_78_C.d
--
Apr 27 2007
http://d.puremagic.com/issues/show_bug.cgi?id=979
onlystupidspamhere yahoo.se changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
is older and the description is a bit more precise.
*** This bug has been marked as a duplicate of 515 ***
--
Jun 17 2007









Tom <tom nospam.com> 