Tool/software: TI C/C++ Compiler
I have found a little oddity with TI's armcl compiler, it reports the error "a const_cast can only adjust type qualifiers; it cannot change the underlying type" when a variable is cast to a typedef via const_cast that does not involve a conversion. It can be reproduced with the following example:
extern "C" void (*const interruptVectors[])(); typedef void (*ISR_t)(void); static ISR_t* source_vector_table = const_cast<ISR_t*>(interruptVectors);
armcl does not compile this, although I think there is no error as interruptVector is of type const ISR_t*. gcc and clang both compile the snippet with -Wall -Wextra -Wpedantic and only report the unused variable source_vector_table.