Hi,
i want use uSTL library with FreeRTOS. When I compiling i get the error:
..ustl/uutility.h(356): error: #1113: Inline assembler not permitted when generating Thumb code
The code(linie 356 is: asm("":+g... ):
template <typename DEST, typename SRC> inline DEST noalias (const DEST&, SRC* s) { asm("":"+g"(s)::"memory"); union UPun { SRC s; DEST d; }; return (((UPun*)(s))->d); }
Do you have same idea how I can solve this problem?
The uSTL docs say the following about noalias(): 'This template is to be used for dereferencing a type-punned pointer without a warning.' It appears that the implementation is extremely gcc-specific. Moreover, it is possible that the sole motivation for this function is gcc's warning 'dereferencing type-punned pointer will break strict-aliasing rules.' This could even not apply to RealView at all. I could be completely wrong about this, of course. I cannot decrypt the 'asm' line, it looks too cryptic. But it does appear that it is safe to just comment out this line to make the build complete. Just deal with it later...