diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
commit | 580bf6130632f6855fddeea7b07c8401c56108f2 (patch) | |
tree | 4bd5e7cdb68408c52ad8df030f7f887c7d97def0 /notes/goto_local_labels.txt | |
parent | db73835b12f41be8766384a1cdcc34a0848354dc (diff) | |
download | slul-main.tar.gz slul-main.tar.bz2 slul-main.zip |
Diffstat (limited to 'notes/goto_local_labels.txt')
-rw-r--r-- | notes/goto_local_labels.txt | 27 |
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: + ... + } + } |