This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17743] __alignof__ vs. typedefs
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Sep 2004 04:45:49 -0000
- Subject: [Bug c++/17743] __alignof__ vs. typedefs
- References: <20040930042632.17743.bkoz@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-30 04:45 -------
Actually this is the attribute aligned vs arrays.
I cannot decode what the documenation means:
Note that although you can ask the compiler to select a time-efficient alignment for a given type and
then declare only individual stand-alone objects of that type, the compiler's ability to select a time-
efficient alignment is primarily useful only when you plan to create arrays of variables having the
relevant (efficiently aligned) type. If you declare or use arrays of variables of an efficiently-aligned type,
then it is likely that your program will also be doing pointer arithmetic (or subscripting, which amounts
to the same thing) on pointers to the relevant type, and the code that the compiler generates for these
pointer arithmetic operations will often be more efficient for efficiently-aligned types than for other
types.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|8670 |
nThis| |
Known to fail|3.3.3 3.4.0 3.4.1 3.4.2 |
|4.0.0 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17743