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.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to