[PATCH v2 2/3] cpukit: Explicitly enforce alignment requirements

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Mar 3 08:52:53 UTC 2021


On 02/03/2021 21:00, Gedare Bloom wrote:

>> +/*
>> + * The use of explicit alignment is necessary below due to behavioral
>> + * expectations of GCC on which RTEMS has relied in the past. These
>> + * behaviors were consistent, but never guaranteed. Some newer platforms
>> + * violate this previous consistency. For more information, see GCC bug
>> + *https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143
>> + */
> I think the comment can be simplified, but I can tell you got bugged
> by this. (pun, intended)
>
> To summarize my understanding, GCC now optimizes space more
> aggressively, and if we want an explicit alignment, it has to be
> explicitly made on each variable that must be aligned. ("typedef"
> alignment now seems to be ignored.)
The problem is that GCC "optimizes" for speed (not size) aggressively 
and may increase the alignment required by the type. The attribute is 
required to force GCC to use specified requirement.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/



More information about the devel mailing list