On Thursday, 2 March 2017 at 13:00:08 UTC, Cecil Ward wrote:
Raised bug here, and I'm raising a PR now also.
https://issues.dlang.org/show_bug.cgi?id=17237
Iain, this of course is present in my version of LDC too. (I
checked.) You couldn't poke David Nadlinger or whoever for me?
Poke recei
On Wednesday, 1 March 2017 at 22:15:59 UTC, Iain Buclaw wrote:
On Wednesday, 1 March 2017 at 19:09:24 UTC, Johan Engelen wrote:
On Wednesday, 1 March 2017 at 18:34:16 UTC, Iain Buclaw wrote:
Simple test case would be:
struct vec_struct {
bool b2;
struct {
bool b;
int8
On Wednesday, 1 March 2017 at 22:15:59 UTC, Iain Buclaw wrote:
On Wednesday, 1 March 2017 at 19:09:24 UTC, Johan Engelen wrote:
On Wednesday, 1 March 2017 at 18:34:16 UTC, Iain Buclaw wrote:
Simple test case would be:
struct vec_struct {
bool b2;
struct {
bool b;
int8
On Wednesday, 1 March 2017 at 22:15:59 UTC, Iain Buclaw wrote:
On Wednesday, 1 March 2017 at 19:09:24 UTC, Johan Engelen wrote:
On Wednesday, 1 March 2017 at 18:34:16 UTC, Iain Buclaw wrote:
Simple test case would be:
struct vec_struct {
bool b2;
struct {
bool b;
int8
On Wednesday, 1 March 2017 at 19:09:24 UTC, Johan Engelen wrote:
On Wednesday, 1 March 2017 at 18:34:16 UTC, Iain Buclaw wrote:
Simple test case would be:
struct vec_struct {
bool b2;
struct {
bool b;
int8 field;
}
}
static assert(vec_struct.b.offsetof == 32);
stat
On Wednesday, 1 March 2017 at 18:34:16 UTC, Iain Buclaw wrote:
Simple test case would be:
struct vec_struct {
bool b2;
struct {
bool b;
int8 field;
}
}
static assert(vec_struct.b.offsetof == 32);
static assert(vec_struct.field.offsetof == 64);
With explicit align(
On Wednesday, 1 March 2017 at 06:04:32 UTC, Cecil Ward wrote:
struct vec_struct {
alias field this;
bool b;
int8 field;
}
In this code when you look at the generated x64 code output by
GDC it seems to be doing a nice job, because it has got the
offset right for the 256-bit YMM
struct vec_struct {
alias field this;
bool b;
int8 field;
}
In this code when you look at the generated x64 code output by
GDC it seems to be doing a nice job, because it has got the
offset right for the 256-bit YMM 'field' correct.
Does D automatically propagate the alignment
On Friday, 14 March 2014 at 00:07:12 UTC, bearophile wrote:
Justin Whear:
It did change a few versions ago (not sure exactly when). Try
adding
`align(1):` inside the structs before the members.
Yes it's a recent change, the align() on outside is the
alignment of the whole struct, and the a
Justin Whear:
It did change a few versions ago (not sure exactly when). Try
adding
`align(1):` inside the structs before the members.
Yes it's a recent change, the align() on outside is the alignment
of the whole struct, and the align inside is the alignment of the
single field relative to
On Thu, 13 Mar 2014 23:19:59 +, TJB wrote:
> Why the difference? What is weird is that the two codes used to give
> the same answers. Has the alignment value of structs changed recently?
It did change a few versions ago (not sure exactly when). Try adding
`align(1):` inside the structs be
I am a bit confused by the alignment of a struct in D. I have
some C++ code that I am translating into D.
Here is the C++:
#include
#include
#include
struct TradesIdx
{
char symbol[10];
int tdate;
int begrec;
int endrec;
}__attribute__((packed));
struct TradesBin
{
int ttim;
i
12 matches
Mail list logo