RTEMS_DECONST - Should it be removed?
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jan 15 05:18:50 UTC 2015
On 14/01/15 18:27, Martin Galvan wrote:
> Hi everyone! We're currently working on improving the TMS570 BSP, and
> in the process we discovered an important bug caused by a misuse of
> the RTEMS_DECONST macro. Said macro seems to be used in a few other
> places throughout the code to bypass const restrictions.
>
> What's the purpose of having something like this in the codebase?
> Should it be removed to maintain const-correctness throughout the
> code?
The purpose is to easily identify all places that cast the const
qualifier away. Sometimes this is necessary, e.g. during object
destruction or in case you have a common read/write API (e.g. struct iovec).
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list