StephaneSeyvoz/mind-compiler — pull request #5 by StephaneSeyvoz (2013-04-04 09:35:29+00:00)
Title: Integrating "Singleton private data" bug fix

Compilation failed with IAR with @Singleton components containing PRIVATE data.
The issue was a "duplicate definition" error at link time, due to the inclusion of .adl.h in .ctrl.c and _impl.c files, and the way PRIVATE was handled (= duplication of the PRIVATE variable in 2 .mpp.c files, which GCC ignored but IAR rejects).
A strategy based on the "non-@Singleton" behavior with typedef was used, as well as a new macro in the .adl.h files when needed, only one definition of PRIVATE data in _instances.c, and the use of "extern" in .ctrl.c and _impl.c files.
The code still may have to be cleaned/review but the logic works fine.
CPL-Preproc was impacted as well as the ADL-Backend, so CPL-Preproc tests had to be fixed accordingly.