/The GNU C Compiler (GCC) – II

The GNU C Compiler (GCC) – II

in the previous article we’ve cleared out some points about The GNU C Compiler and what GNU have added to C to make it the GNU C. we’ve reached to the local labels feature last time.
In this article I shall continue what we’ve started on the previous article
Labels as a value: –
the address of a label can be obtained by the operator && ( unary operator ). The value you use is a (void *).

in the previous code you obtain the address of the label into ptr. to use this value with a label which is treated as a value (ptr). you need to write it as follow, “goto *ptr;”
due to the Local Labels feature we’ve previously discussed; you can’t jump to labels in other functions via thier pointer. the Label pointers are treated much like normal pointers the only difference is using a unary operator to obtain the address value.
Nesting functions :-
nested function is a function that is defined inside another function. and the local/global scopes rule implies to that functions of course.

of course everything in the containing function is considered global to the nested function.
accessing the nested function via pointer to function outside the containing function is a disaster since all local variables will disappear. and you’ll end up dealing and overwriting garbage.
Typeof:-
typeof is an operator to obtain the data type of an expression. and yes it’s like the ISO C keyword sizeof.
typeof   (array[0](1));
This is a typeof a function in an array of functions
typeof   (char *);
this will return a pointer to char type
yet the usage of typeof can be extended and can be used in alot of purposes.
Setting an array length to variable Length
GNU C provides this feature, that you can simply set an array length to variable like that

Also you can pass define a variable length array in the arguments based on the previous argument..Like this

we’ll  meet again next week