0

I need to cast const void * to LLVMValRef ,like this

const void * context;     
args[0] = LLVMCastPtrToBoolType((void *) context);

I get the following warning.

warning: cast from type ‘const void*’ to type ‘void*’ casts away qualifiers

Cœur
  • 37,241
  • 25
  • 195
  • 267
Pradeep
  • 23
  • 8
  • you are always going to get that warning, unless you turn it off... (const void *) is a promise that nothing is gonna mess with that data... then you give it to something that can mess with it... if you just need the value then just use the value... you can copy from const to non const, but it is different memory... – Grady Player Nov 11 '16 at 17:53
  • thanks for your time @GradyPlayer – Pradeep Nov 12 '16 at 07:07

0 Answers0