Results 1 to 4 of 4

Thread: Warning when returning local address in non kernel function...

Threaded View

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    12

    Warning when returning local address in non kernel function...

    Hi all,

    Here is a sample ..

    double* foo () {

    double result_reg[2];
    result_reg[0] = ...
    result_reg[1] = ...
    return result_reg;
    }

    I am not sure the content of result will not be erased, when exiting from foo(). Am I right, or is there a function address space like stack in C?
    Many thanks!
    Last edited by mbenguig; 05-31-2013 at 03:19 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •