This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Function with two or more entry point


The most similar (but without function):

#include <stdio.h>

int main ()
{
  void *goto_after;
  
  ///////////////////////
  if (0)
  {
    test_print1:
      printf("print1\n");
      
    test_print2:
      printf("print2\n");

    goto *goto_after;
  }
  ///////////////////////
  
  goto_after = &&label1; goto test_print1; label1: 
  goto_after = &&label2; goto test_print2; label2: 
  return 0;
} 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]