Retrieve label name

Ian Lance Taylor
Wed Apr 15 15:35:00 GMT 2009

"Vincent R." <> writes:

> when declaring a label like this :
> tree block, body, cond, except_stmt, label, tlabel, name;
>   location_t loc, loclabel;
>   gcc_assert (c_parser_next_token_is_keyword (parser, RID_SEH_TRY));
>   /* label try */
>   loclabel = c_parser_peek_token (parser)->location;
>   name = c_parser_peek_token (parser)->value;
>   cfun->seh_try_begin_label = name;
>   tlabel = define_label (loclabel, name);
>   ...
> How can we know the label name( that will be generated ?

Do you mean what label will be generated in the assembler code?  That is
almost certainly not the right question to ask during the parse, so: why
do you want to know?

In any case, there is no answer in the frontend.  The assembly level
label name is normally not determined until RTL is generated.


More information about the Gcc-help mailing list