Skip to content
Snippets Groups Projects
Commit 47914d50 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[printer] ensures labels are not put on declarations

Fixes #617

Technically, the C standard distinguishes between declarations and statements,
and only the latter may have labels attached to them. Thus, printing a label
directly over a `Local_init` will result in ill-formed C code. In order to
avoid that, we add a dummy nop (aka `;`) in-between.

A first version was done in !1518, but failed to take into account
`UnspecifiedSequence` whose first element happens to be a `Local_init` :sob:
parent f2a4ab8f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment