This is the mail archive of the gcc-bugs@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]

[Bug c++/17743] __alignof__ vs. typedefs


------- 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


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