Skip to content

Conversation

@ringabout
Copy link
Member

Otherwise it gives a C error

nimcache/tes8193z1.c:433:3: error: 'break' statement not in loop or switch statement
  433 |   break;}
      |   ^

@ringabout ringabout changed the title fixes unnamed block gnerates invalid C code fixes unnamed block generated invalid C code Dec 10, 2025
@Araq
Copy link
Member

Araq commented Dec 10, 2025

An unnamed break to exist from a block is valid code though, you cannot simply disallow it.

@ringabout
Copy link
Member Author

ringabout commented Dec 11, 2025

Okay, but it's already a deprecated warning in Nim, I can try to make it work and produce a warning

@Araq
Copy link
Member

Araq commented Dec 11, 2025

We don't really have any infrastructure for warnings and it wouldn't change the fact that it's a compiler bug we need to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants