https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
Eric Estievenart changed:
What|Removed |Added
CC||steve+gcc at tecwec dot eu
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #13 from Rene Rahn ---
(In reply to Eric Gallager from comment #12)
> (In reply to Rene Rahn from comment #10)
> > I know this is quite old now. But can someone explain me why using `#pragma
> > pack(push, 1)` does work then? I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
Eric Gallager changed:
What|Removed |Added
CC||egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #11 from Ed Catmur ---
(In reply to rene.rahn from comment #10)
> I know this is quite old now. But can someone explain me why using `#pragma
> pack(push, 1)` does work then?
`#pragma pack` has sharper edges. It will let you take
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
rene.r...@fu-berlin.de changed:
What|Removed |Added
CC||rene.r...@fu-berlin.de
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #9 from Marc Glisse ---
I was thinking that
struct __attribute__((packed)) A { int i; };
should be handled like
typedef int int_unaligned __attribute__((aligned(1)));
struct A { int_unaligned i; };
but it appears that for the aligned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #8 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to Xiao Jia from comment #7)
Adding const makes it compile. Is this the intended behavior or not?
Yes, of course. A const-reference causes a temporary to be created, you
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
Xiao Jia xiaoj at google dot com changed:
What|Removed |Added
CC||xiaoj at google dot
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #6 from Gabriel M. Beddingfield gabriel at teuton dot org ---
All assignments of obj.s to type short and short* are incorrect, and ideally
they would all result in compiler errors.
The C++ spec (C++03, Sects. 3.9, 3.9.1, 3.9.2) are
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
Hei structurechart at yahoo dot com changed:
What|Removed |Added
CC||structurechart at
--- Comment #4 from gabriel at teuton dot org 2009-10-11 04:38 ---
I have the same problem with g++ 4.2.4 and 4.3.2.
--
gabriel at teuton dot org changed:
What|Removed |Added
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-06-18 18:31 ---
This is correct you cannot take the address of a field of a packed struct.
short pit(oj.s);
This should be also an error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
--- Comment #2 from nevin at eviloverlord dot com 2008-06-18 18:49 ---
Why is this an error (I couldn't find anything in the documentation)?
Also, if pointers are used instead of references, should that be an error
(currently that compiles just fine)?
--
--- Comment #3 from nevin at eviloverlord dot com 2008-06-18 19:06 ---
Expanding on my last comment: which lines in the following code should fail to
compile:
struct Squeeze
{
short s;
} __attribute__((aligned(1), packed));
void VerticallyChallenged(short*) {}
void
14 matches
Mail list logo