This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR middle-end/26306


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

| > My beef with AGGREGATE_TYPE_P is that I can't see any reason that an 
| > SImode "struct S { int i; }" should be treated differently from plain 
| > "int i".  Even accepting the arguments about hardware registers, etc., I 
| > would still have a hard time explaining why the struct should behave 
| > differently from the scalar.
| 
| But that's not the only way to make an SImode struct!  What about a struct
| of four chars with an alignment of 32 specified.

That is a legitimate question, but it also holds for the plain int too.
I believe the semantics outlined by Mark makes more sense than the
alternative of access as array of chars.  We also have to keep in
perspective that people put thinkgs in structs because they want to
tag data with a specific type; and that is the most common usage.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]