aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/goto_local_labels.txt
diff options
context:
space:
mode:
Diffstat (limited to 'notes/goto_local_labels.txt')
-rw-r--r--notes/goto_local_labels.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/notes/goto_local_labels.txt b/notes/goto_local_labels.txt
new file mode 100644
index 0000000..a91cbbe
--- /dev/null
+++ b/notes/goto_local_labels.txt
@@ -0,0 +1,27 @@
+Local goto labels
+=================
+
+This can be used to provide scope for goto labels and avoid accidentally
+jumping to an unrelated block.
+
+Syntax idea (borrowed from the GCC extension):
+
+ func f()
+ {
+ {
+ label skip
+ ...
+ goto skip
+ ...
+ skip:
+ ...
+ }
+ {
+ label skip
+ ...
+ goto skip
+ ...
+ skip:
+ ...
+ }
+ }