[LLVMdev] Call to address 0 gets removed

Duncan Sands baldrick at free.fr
Wed Jun 10 06:11:02 PDT 2009


Sylvere Teissier wrote:
>> Calling 0 is undefined behavior; the optimizer is within its rights to  
>> remove this.  Why do you want to call 0?
> 
> For example, on embedded platforms you call 0 to do a soft reset.

You can do this using an asm.  Since you are acting outside the C
standard, this is probably "the right way" of doing it (tm).

Ciao,

Duncan.



More information about the llvm-dev mailing list