Thank you for the responses.
What I have done wrong is already pointed out.
If you are curious what I am trying to do:

1. I wanted to have jmp_buf* passed as a function parameter in order to avoid 
a global variable. Therefore, in the function body I had to use a local 
variable and initialize it with this pointer:
    jmp_buf local_variable = *function_paramter;

2. The work I am doing is just my homework in a compilation course.

3. Why use jmp_buf at all? Because this is the front end for a compiler for a 
simple programming language and this method seems to make things simple when 
using bison. Quoting libc.info:

<quoting>
   As an example of a situation where a non-local exit can be useful,
suppose you have an interactive program that has a "main loop" that
prompts for and executes commands.  Suppose the "read" command reads
input from a file, doing some lexical analysis and parsing of the input
while processing it.  If a low-level input error is detected, it would
be useful to be able to return immediately to the "main loop" instead
of having to make each of the lexical analysis, parsing, and processing
phases all have to explicitly deal with error situations initially
detected by nested calls.
<\quoting> 

(I am not saying that this is the only/best method, just why I am using it.)
-- 

        Shaul Karl <[EMAIL PROTECTED]>

Hillel used to say: If I am not for myself who will be for me?
Yet, if I am for myself only, what am I? And if not now, when?
                                          (Ethics Of The Fathers 1:14)




=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to