[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 --- Comment #6 from rguenther at suse dot de --- On Fri, 26 Aug 2016, andre.simoesdiasvieira at arm dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 > > --- Comment #5 from Andre Vieira --- > I see, thank you! > > Oh and l

[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 --- Comment #5 from Andre Vieira --- I see, thank you! Oh and leaving out the const yields an error: t.cpp:28:16: error: cannot bind packed field '((B*)this)->B::s->test_struct::c' to 'short int&' return A (s->c);

[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 --- Comment #4 from rguenther at suse dot de --- On Fri, 26 Aug 2016, andre.simoesdiasvieira at arm dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 > > --- Comment #3 from Andre Vieira --- > Thank you Richard! > > I have a

[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 --- Comment #3 from Andre Vieira --- Thank you Richard! I have a follow up question. Why is this only a problem when passing by reference and not when passing a pointer? So say: #define PACKED __attribute__ ((packed)) #define TYPE_C short typ

[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/77388] Reference to a packed structure member

2016-08-26 Thread michal.fita at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388 MichaƂ Fita changed: What|Removed |Added CC||michal.fita at gmail dot com --- Comment #