[Bug c++/36566] Cannot bind packed field

2021-12-31 Thread steve+gcc at tecwec dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566 Eric Estievenart changed: What|Removed |Added CC||steve+gcc at tecwec dot eu ---

[Bug c++/36566] Cannot bind packed field

2020-03-04 Thread rene.r...@fu-berlin.de
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

[Bug c++/36566] Cannot bind packed field

2020-03-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org

[Bug c++/36566] Cannot bind packed field

2020-03-03 Thread ed at catmur dot uk
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

[Bug c++/36566] Cannot bind packed field

2020-03-03 Thread rene.r...@fu-berlin.de
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 ---

[Bug c++/36566] Cannot bind packed field

2017-02-11 Thread glisse at gcc dot gnu.org
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

[Bug c++/36566] Cannot bind packed field

2015-03-17 Thread redi at gcc dot gnu.org
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

[Bug c++/36566] Cannot bind packed field

2015-03-17 Thread xiaoj at google dot com
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

[Bug c++/36566] Cannot bind packed field

2013-09-14 Thread gabriel at teuton dot org
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

[Bug c++/36566] Cannot bind packed field

2013-09-12 Thread structurechart at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566 Hei structurechart at yahoo dot com changed: What|Removed |Added CC||structurechart at

[Bug c++/36566] Cannot bind packed field

2009-10-10 Thread gabriel at teuton dot org
--- 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

[Bug c++/36566] Cannot bind packed field

2008-06-18 Thread pinskia at gcc dot gnu dot org
--- 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

[Bug c++/36566] Cannot bind packed field

2008-06-18 Thread nevin at eviloverlord dot com
--- 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)? --

[Bug c++/36566] Cannot bind packed field

2008-06-18 Thread nevin at eviloverlord dot com
--- 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