https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91423
--- Comment #5 from Anders Schau Knatten ---
(In reply to Andrew Pinski from comment #4)
> Vec size = s.size;
>
> you are invoking the copy constructor here ...
> Which means you are taking the address (implicitly).
Good point.
This should be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91423
--- Comment #3 from Anders Schau Knatten ---
(In reply to Richard Biener from comment #1)
> I think GCC tells you that deriving from std::array from a packed struct is
> going to cause trouble because std::array expects to be naturally aligned?
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: anders at knatten dot org
Target Milestone: ---
Compiling this with `-std=c++17 -Wall` on gcc 9.1.0:
```
#include
struct __attribute__((__packed__)) Vec : std::array
{};
struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66672
--- Comment #4 from Anders Schau Knatten ---
Update: There's a related issue with Clang, in which Richard Smith makes a good
argument: https://bugs.llvm.org/show_bug.cgi?id=35423#c2
He refers to http://eel.is/c++draft/expr.prim.id.unqual#2.sente
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66672
Anders Schau Knatten changed:
What|Removed |Added
CC||anders at knatten dot org
NCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: anders at knatten dot org
Created attachment 30461
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30461&action=edit
As requested by "Prep