uVision5.31 Armcc V5.06 update 6
I am trying to use #pragma statements to suppress not referenced warnings for a function.
From the manual I think I need:
#pragma diag_suppress 177
But this doesn't work, I still get "#177-D declared but never referenced" warnings; I have tried different versions of the #pragma diag_suppress 177 statement: including the hash, including the '-D', leading zero; but I just cannot get it to work.Has anyone got this working?
I was looking at: https://www.keil.com/support/man/docs/ARMCC/armcc_chr1359124986491.htmBut I see what you are saying; the C files aren't going to be passed by the linker, so unless the compiler copies the pragma instruction into the assembled code files somehow, it's not going to work.
I didn't think of that.
The linker has it's own parameters. So for example I pass
# Empty region warningLDFLAGS+= --diag_suppress=6312
to the linker.